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:
Drew Jaynes (DrewAPicture) 2014-10-10 17:13:52 +00:00
parent bce6d64d59
commit e94fef0168
1 changed files with 9 additions and 7 deletions

View File

@ -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
* @access private
*
* @param object $menu_item The menu item to check
* @return bool false if invalid, else true.
* @param object $item The menu item to check.
* @return bool False if invalid, otherwise true.
*/
function _is_valid_nav_menu_item( $item ) {
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
*
* @param string $menu menu name, id, or slug
* @param string $args
* @return mixed $items array of menu items, else false.
* @param string $menu Menu name, ID, or slug.
* @param array $args Optional. Arguments to pass to {@see get_posts()}.
* @return mixed $items Array of menu items, otherwise false.
*/
function wp_get_nav_menu_items( $menu, $args = array() ) {
$menu = wp_get_nav_menu_object( $menu );