s/custom_nav()/wp_nav_menu()/. see #11817

git-svn-id: https://develop.svn.wordpress.org/trunk@13361 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-02-24 06:18:13 +00:00
parent cc931001f4
commit f6e79cc66c
3 changed files with 9 additions and 3 deletions

View File

@ -49,6 +49,10 @@ function wp_create_nav_menu( $menu_name ) {
return wp_insert_term( $menu_name, 'nav_menu' );
}
function wp_get_nav_menu( $menu ) {
return get_term( (int) $menu, 'nav_menu');
}
function wp_get_nav_menus() {
return get_terms( 'nav_menu', array( 'hide_empty' => false ) );
}

View File

@ -1126,7 +1126,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget {
<?php
//DISPLAY custom navigation menu
if ( get_option('wp_custom_nav_menu') == 'true' )
custom_nav( array('id' => $navmenu, 'name' => $wp_custom_nav_menu_name, 'desc' => $navwidgetdescription) );
wp_nav_menu( array('id' => $navmenu, 'name' => $wp_custom_nav_menu_name, 'desc' => $navwidgetdescription) );
?>
<?php

View File

@ -2216,11 +2216,13 @@ function get_the_generator( $type = '' ) {
}
/**
* Outputs the Custom Navigation.
* Outputs a navigation menu.
*
* @since 3.0.0
*
* @param array $args Arguments
*/
function custom_nav($args = array()) {
function wp_nav_menu( $args = array() ) {
require_once (ABSPATH . WPINC . '/custom-navigation.php');
wp_custom_navigation_output($args);
}