Make WordPress Core

Ticket #8315: 8315.diff

File 8315.diff, 1.5 KB (added by jacobsantos, 17 years ago)

phpdoc inline documentation for wp_page_menu() based on trunk

  • post-template.php

     
    635635}
    636636
    637637/**
    638  * Display menu of pages.
     638 * Display or retrieve list of pages with optional home link.
    639639 *
     640 * The arguments are listed below and part of the arguments are for {@link
     641 * wp_list_pages()} function. Check that function for more info on those
     642 * arguments.
     643 *
     644 * <ul>
     645 * <li><strong>sort_column</strong> - How to sort the list of pages. Defaults
     646 * to page title. Use column for posts table.</li>
     647 * <li><strong>menu_class</strong> - Class to use for the div ID which contains
     648 * the page list. Defaults to 'menu'.</li>
     649 * <li><strong>echo</strong> - Whether to echo list or return it. Defaults to
     650 * echo.</li>
     651 * <li><strong>link_before</strong> - Text before show_home argument text.</li>
     652 * <li><strong>link_after</strong> - Text after show_home argument text.</li>
     653 * <li><strong>show_home</strong> - If you set this argument, then it will
     654 * display the link to the home page. The show_home argument really just needs
     655 * to be set to the value of the text of the link.</li>
     656 * </ul>
     657 *
    640658 * @since 2.7.0
    641659 *
    642660 * @param array|string $args
     
    649667        $menu = '';
    650668
    651669        // Show Home in the menu
    652         if ( !empty($args['show_home']) ) {
     670        if ( isset($args['show_home']) && ! empty($args['show_home']) ) {
    653671                if ( true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home'] )
    654672                        $text = __('Home');
    655673                else