Changeset 14721
- Timestamp:
- 05/18/2010 05:59:25 AM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r14666 r14721 184 184 * walker - allows a custom walker to be specified. 185 185 * context - the context the menu is used in. 186 * 187 * @todo show_home - If you set this argument, then it will display the link to the home page. The show_home argument really just needs to be set to the value of the text of the link. 186 * theme_location - the location in the theme to be used. Must be registered with register_nav_menu() in order to be selectable by the user. 188 187 * 189 188 * @since 3.0.0 -
trunk/wp-includes/nav-menu.php
r14620 r14721 13 13 * @since 3.0.0 14 14 * 15 * @param string $menu Menu id 16 * @return mixed $menu|false Or WP_Error 15 * @uses get_term 16 * @uses get_term_by 17 * 18 * @param string $menu Menu id, slug or name 19 * @return mixed false if $menu param isn't supplied or term does not exist, menu object if successfull 17 20 */ 18 21 function wp_get_nav_menu_object( $menu ) { … … 42 45 * @since 3.0.0 43 46 * 44 * @param int|string $menu The menu to check 47 * @param int|string $menu The menu to check (id, slug, or name) 45 48 * @return bool Whether the menu exists. 46 49 */ … … 88 91 register_nav_menus( array( $location => $description ) ); 89 92 } 90 93 /** 94 * Returns an array of all registered nav menus in a theme 95 * 96 * @since 3.0.0 97 * @return array 98 */ 91 99 function get_registered_nav_menus() { 92 100 return $GLOBALS['_wp_registered_nav_menus']; 93 101 } 102 103 /** 104 * Returns an array with the registered nav menu locations and the menu assigned to it 105 * 106 * @since 3.0.0 107 * @return array 108 */ 94 109 95 110 function get_nav_menu_locations() { … … 469 484 $object = get_post_meta( $item->ID, '_menu_item_object', true ); 470 485 $type = get_post_meta( $item->ID, '_menu_item_type', true ); 471 486 472 487 if ( 'post_type' == $type ) 473 488 $posts[$object][] = $object_id; … … 475 490 $terms[$object][] = $object_id; 476 491 } 477 492 478 493 if ( !empty($posts) ) { 479 494 foreach ( array_keys($posts) as $post_type ) { … … 482 497 } 483 498 unset($posts); 484 499 485 500 if ( !empty($terms) ) { 486 501 foreach ( array_keys($terms) as $taxonomy ) {
Note: See TracChangeset
for help on using the changeset viewer.