Changeset 53220 for trunk/src/wp-admin/includes/nav-menu.php
- Timestamp:
- 04/19/2022 03:11:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r53207 r53220 326 326 * @global int|string $nav_menu_selected_id 327 327 * 328 * @param string $ item_object Not used.328 * @param string $data_object Not used. 329 329 * @param array $box { 330 330 * Post type menu item meta box arguments. … … 336 336 * } 337 337 */ 338 function wp_nav_menu_item_post_type_meta_box( $ item_object, $box ) {338 function wp_nav_menu_item_post_type_meta_box( $data_object, $box ) { 339 339 global $_nav_menu_placeholder, $nav_menu_selected_id; 340 340 … … 690 690 * @global int|string $nav_menu_selected_id 691 691 * 692 * @param string $ item_object Not used.692 * @param string $data_object Not used. 693 693 * @param array $box { 694 694 * Taxonomy menu item meta box arguments. … … 700 700 * } 701 701 */ 702 function wp_nav_menu_item_taxonomy_meta_box( $ item_object, $box ) {702 function wp_nav_menu_item_taxonomy_meta_box( $data_object, $box ) { 703 703 global $nav_menu_selected_id; 704 704 … … 990 990 * @access private 991 991 * 992 * @param object $ item_object The post type or taxonomy meta-object.992 * @param object $data_object The post type or taxonomy meta-object. 993 993 * @return object The post type or taxonomy object. 994 994 */ 995 995 function _wp_nav_menu_meta_box_object( $item_object = null ) { 996 if ( isset( $ item_object->name ) ) {997 998 if ( 'page' === $ item_object->name ) {999 $ item_object->_default_query = array(996 if ( isset( $data_object->name ) ) { 997 998 if ( 'page' === $data_object->name ) { 999 $data_object->_default_query = array( 1000 1000 'orderby' => 'menu_order title', 1001 1001 'post_status' => 'publish', … … 1003 1003 1004 1004 // Posts should show only published items. 1005 } elseif ( 'post' === $ item_object->name ) {1006 $ item_object->_default_query = array(1005 } elseif ( 'post' === $data_object->name ) { 1006 $data_object->_default_query = array( 1007 1007 'post_status' => 'publish', 1008 1008 ); 1009 1009 1010 1010 // Categories should be in reverse chronological order. 1011 } elseif ( 'category' === $ item_object->name ) {1012 $ item_object->_default_query = array(1011 } elseif ( 'category' === $data_object->name ) { 1012 $data_object->_default_query = array( 1013 1013 'orderby' => 'id', 1014 1014 'order' => 'DESC', … … 1017 1017 // Custom post types should show only published items. 1018 1018 } else { 1019 $ item_object->_default_query = array(1019 $data_object->_default_query = array( 1020 1020 'post_status' => 'publish', 1021 1021 ); … … 1023 1023 } 1024 1024 1025 return $ item_object;1025 return $data_object; 1026 1026 } 1027 1027
Note: See TracChangeset
for help on using the changeset viewer.