Ticket #17029: 17029.diff
File 17029.diff, 1.8 KB (added by , 13 years ago) |
---|
-
wp-includes/class-wp-walker.php
396 396 } 397 397 } 398 398 399 ?> 400 No newline at end of file 399 ?> -
wp-admin/includes/nav-menu.php
207 207 * @uses Walker_Nav_Menu 208 208 */ 209 209 class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu { 210 function __construct( $fields = false ) { 211 if( $fields ) { 212 $this->db_fields = $fields; 213 } 214 } 215 216 function strat_lvl( &$output, $depth ) { 217 $indent = str_repeat( "\t", $depth ); 218 $output .= "\n$indent<ul class='children'>\n"; 219 } 220 221 function end_lvl( &$output, $depth ) { 222 $indent = str_repeat( "\t", $depth ); 223 $output .= "\n$indent</ul>"; 224 } 210 225 211 226 /** 212 227 * @see Walker::start_el() … … 613 628 614 629 if ( !$posts ) 615 630 $error = '<li id="error">'. $post_type['args']->labels->not_found .'</li>'; 631 632 $db_fields = false; 633 if( isset( $post_type['args']->hierarchical ) && $post_type['args']->hierarchical ) { 634 $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' ); 635 } 616 636 617 $walker = new Walker_Nav_Menu_Checklist ;637 $walker = new Walker_Nav_Menu_Checklist( $db_fields ); 618 638 619 639 $current_tab = 'most-recent'; 620 640 if ( isset( $_REQUEST[$post_type_name . '-tab'] ) && in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) { … … 716 736 'object_id' => $_nav_menu_placeholder, 717 737 'post_content' => '', 718 738 'post_excerpt' => '', 739 'post_parent' => '', 719 740 'post_title' => _x('Home', 'nav menu home label'), 720 741 'post_type' => 'nav_menu_item', 721 742 'type' => 'custom',