Correct @return value for wp_create_nav_menu() and wp_delete_nav_menu().
props Tmeister. fixes #27745. Built from https://develop.svn.wordpress.org/trunk@28242 git-svn-id: http://core.svn.wordpress.org/trunk@28070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ad1c8897c
commit
7214648764
|
@ -15,7 +15,7 @@
|
|||
* @uses get_term
|
||||
* @uses get_term_by
|
||||
*
|
||||
* @param string $menu Menu id, slug or name
|
||||
* @param string $menu Menu ID, slug, or name.
|
||||
* @return mixed false if $menu param isn't supplied or term does not exist, menu object if successful.
|
||||
*/
|
||||
function wp_get_nav_menu_object( $menu ) {
|
||||
|
@ -43,7 +43,7 @@ function wp_get_nav_menu_object( $menu ) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param int|string $menu The menu to check (id, slug, or name)
|
||||
* @param int|string $menu The menu to check (ID, slug, or name).
|
||||
* @return bool Whether the menu exists.
|
||||
*/
|
||||
function is_nav_menu( $menu ) {
|
||||
|
@ -163,8 +163,8 @@ function is_nav_menu_item( $menu_item_id = 0 ) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $menu_name Menu Name
|
||||
* @return mixed Menu object on success|WP_Error on failure
|
||||
* @param string $menu_name Menu name.
|
||||
* @return int|WP_Error Menu ID on success, WP_Error object on failure.
|
||||
*/
|
||||
function wp_create_nav_menu( $menu_name ) {
|
||||
return wp_update_nav_menu_object( 0, array( 'menu-name' => $menu_name ) );
|
||||
|
@ -175,8 +175,8 @@ function wp_create_nav_menu( $menu_name ) {
|
|||
*
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $menu name|id|slug
|
||||
* @return mixed Menu object on success|WP_Error on failure
|
||||
* @param string $menu Menu ID, slug, or name.
|
||||
* @return bool|WP_Error True on success, false or WP_Error object on failure.
|
||||
*/
|
||||
function wp_delete_nav_menu( $menu ) {
|
||||
$menu = wp_get_nav_menu_object( $menu );
|
||||
|
@ -221,7 +221,7 @@ function wp_delete_nav_menu( $menu ) {
|
|||
*
|
||||
* @param int $menu_id The ID of the menu or "0" to create a new menu.
|
||||
* @param array $menu_data The array of menu data.
|
||||
* @return int|WP_Error object The menu's ID or WP_Error object.
|
||||
* @return int|WP_Error Menu ID on success, WP_Error object on failure.
|
||||
*/
|
||||
function wp_update_nav_menu_object( $menu_id = 0, $menu_data = array() ) {
|
||||
$menu_id = (int) $menu_id;
|
||||
|
|
Loading…
Reference in New Issue