Changeset 38129
- Timestamp:
- 07/21/2016 07:18:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/nav-menu.php
r38128 r38129 298 298 * 299 299 * @param string $object Not used. 300 * @param array $post_type{301 * Data that will be used as arguments of the post type meta box.300 * @param array $box { 301 * Post type menu item meta box arguments. 302 302 * 303 303 * @type string $id Meta box ID (used in the 'id' attribute for the meta box). 304 * @type string $title Title of the meta box.305 * @type string $callback Function that fills the box with the desired content.306 * @type WP_Post_Type $args The current post type object for this menu item meta box.304 * @type string $title Meta box title. 305 * @type string $callback Meta box display callback. 306 * @type WP_Post_Type $args Extra meta box arguments (the post type object for this meta box). 307 307 * } 308 308 */ 309 function wp_nav_menu_item_post_type_meta_box( $object, $ post_type) {309 function wp_nav_menu_item_post_type_meta_box( $object, $box ) { 310 310 global $_nav_menu_placeholder, $nav_menu_selected_id; 311 311 312 $post_type_name = $ post_type['args']->name;312 $post_type_name = $box['args']->name; 313 313 314 314 // Paginate browsing for large numbers of post objects. … … 328 328 ); 329 329 330 if ( isset( $ post_type['args']->_default_query ) )331 $args = array_merge($args, (array) $ post_type['args']->_default_query );330 if ( isset( $box['args']->_default_query ) ) 331 $args = array_merge($args, (array) $box['args']->_default_query ); 332 332 333 333 // @todo transient caching of these results with proper invalidation on updating of a post of this type … … 419 419 * @since 4.3.0 420 420 * 421 * @param array 422 * @param array 423 * @param object $post_type The current post type object for this menu item meta box.421 * @param array $most_recent An array of post objects being listed. 422 * @param array $args An array of WP_Query arguments. 423 * @param array $box Arguments passed to wp_nav_menu_item_post_type_meta_box(). 424 424 */ 425 $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $ post_type);425 $most_recent = apply_filters( "nav_menu_items_{$post_type_name}_recent", $most_recent, $args, $box ); 426 426 427 427 echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
Note: See TracChangeset
for help on using the changeset viewer.