theme_location && $depth === 0 ){ // if (in_array("menu-item-has-children", $item->classes)) { // $output .=''; // } // } // return $output; // } function seozie_customize_comment_field($fields) { $commenter = wp_get_current_commenter(); $req = get_option('require_name_email'); $aria_req = ($req ? " aria-required='true'" : ''); $comment_field = $fields['comment']; unset($fields['comment']); unset($fields['cookies']); unset($fields['author']); unset($fields['url']); unset($fields['email']); $fields['author'] = '
'; $fields['email'] = ''; $fields['url'] = ''; $fields['comment'] = $comment_field; return $fields; } add_filter('comment_form_fields', 'seozie_customize_comment_field'); function menu_set_dropdown( $sorted_menu_items, $args ) { $last_top = 0; foreach ( $sorted_menu_items as $key => $obj ) { // it is a top lv item? if ( 0 == $obj->menu_item_parent ) { // set the key of the parent $last_top = $key; } else { $sorted_menu_items[$last_top]->classes['dropdown'] = 'dropdown'; } } return $sorted_menu_items; } add_filter( 'wp_nav_menu_objects', 'menu_set_dropdown', 10, 2 ); function seozie_add_sub_toggles_to_main_menu( $args, $item, $depth ) { // Add sub menu toggles to the Expanded Menu with toggles. if ( 'primary' === $args->theme_location ) { if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $args->after = ''; } else { $args->after = ''; } } return $args; } add_filter( 'nav_menu_item_args', 'seozie_add_sub_toggles_to_main_menu', 10, 3 ); ?>