Clarify inline documentation for the _is_valid_nav_menu_item()
and wp_get_nav_menu_items()
in wp-includes/nav-menu.php.
Props morganestes for the initial patch. Fixes #29914. git-svn-id: https://develop.svn.wordpress.org/trunk@29868 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bce6d64d59
commit
e94fef0168
@ -513,13 +513,15 @@ function _sort_nav_menu_items( $a, $b ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns if a menu item is valid. Bug #13958
|
* Return if a menu item is valid.
|
||||||
|
*
|
||||||
|
* @link https://core.trac.wordpress.org/ticket/13958
|
||||||
*
|
*
|
||||||
* @since 3.2.0
|
* @since 3.2.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @param object $menu_item The menu item to check
|
* @param object $item The menu item to check.
|
||||||
* @return bool false if invalid, else true.
|
* @return bool False if invalid, otherwise true.
|
||||||
*/
|
*/
|
||||||
function _is_valid_nav_menu_item( $item ) {
|
function _is_valid_nav_menu_item( $item ) {
|
||||||
if ( ! empty( $item->_invalid ) )
|
if ( ! empty( $item->_invalid ) )
|
||||||
@ -529,13 +531,13 @@ function _is_valid_nav_menu_item( $item ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all menu items of a navigation menu.
|
* Return all menu items of a navigation menu.
|
||||||
*
|
*
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param string $menu menu name, id, or slug
|
* @param string $menu Menu name, ID, or slug.
|
||||||
* @param string $args
|
* @param array $args Optional. Arguments to pass to {@see get_posts()}.
|
||||||
* @return mixed $items array of menu items, else false.
|
* @return mixed $items Array of menu items, otherwise false.
|
||||||
*/
|
*/
|
||||||
function wp_get_nav_menu_items( $menu, $args = array() ) {
|
function wp_get_nav_menu_items( $menu, $args = array() ) {
|
||||||
$menu = wp_get_nav_menu_object( $menu );
|
$menu = wp_get_nav_menu_object( $menu );
|
||||||
|
Loading…
Reference in New Issue
Block a user