mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
phpdoc and notice fix for wp_page_menu(). Fixes #8315 props jacobsantos.
git-svn-id: http://svn.automattic.com/wordpress/trunk@9844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
99cddfb8b8
commit
3a06fdf0b8
@ -635,7 +635,25 @@ function wp_list_pages($args = '') {
|
||||
}
|
||||
|
||||
/**
|
||||
* Display menu of pages.
|
||||
* Display or retrieve list of pages with optional home link.
|
||||
*
|
||||
* The arguments are listed below and part of the arguments are for {@link
|
||||
* wp_list_pages()} function. Check that function for more info on those
|
||||
* arguments.
|
||||
*
|
||||
* <ul>
|
||||
* <li><strong>sort_column</strong> - How to sort the list of pages. Defaults
|
||||
* to page title. Use column for posts table.</li>
|
||||
* <li><strong>menu_class</strong> - Class to use for the div ID which contains
|
||||
* the page list. Defaults to 'menu'.</li>
|
||||
* <li><strong>echo</strong> - Whether to echo list or return it. Defaults to
|
||||
* echo.</li>
|
||||
* <li><strong>link_before</strong> - Text before show_home argument text.</li>
|
||||
* <li><strong>link_after</strong> - Text after show_home argument text.</li>
|
||||
* <li><strong>show_home</strong> - 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.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
@ -649,7 +667,7 @@ function wp_page_menu( $args = array() ) {
|
||||
$menu = '';
|
||||
|
||||
// Show Home in the menu
|
||||
if ( !empty($args['show_home']) ) {
|
||||
if ( isset($args['show_home']) && ! empty($args['show_home']) ) {
|
||||
if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] )
|
||||
$text = __('Home');
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user