Make WordPress Core

Ticket #4969: 4969.2.patch

File 4969.2.patch, 3.2 KB (added by igmoweb, 10 years ago)
  • src/wp-includes/general-template.php

     
    15201520 *     @type string     $order           Whether to use ascending or descending order. Accepts 'ASC', or 'DESC'.
    15211521 *                                       Default 'DESC'.
    15221522 *     @type string     $post_type       Post type. Default 'post'.
     1523 *     @type string     $title           List heading. Passing a null or empty value will result in no heading, and the list
     1524 *                                       will not be wrapped and $title_before and $title_after become useless. Default ''.
     1525 *     @type string     $title_before    Text or HTML to precede the title. Default ''.
     1526 *     @type string     $title_after     Text or HTML to follow the list of pages. Default ''.
    15231527 * }
    15241528 * @return string|void String when retrieving.
    15251529 */
     
    15311535                'format' => 'html', 'before' => '',
    15321536                'after' => '', 'show_post_count' => false,
    15331537                'echo' => 1, 'order' => 'DESC',
    1534                 'post_type' => 'post'
     1538                'post_type' => 'post', 'title' => '',
     1539                'title_before' => '', 'title_after' => '',
     1540                'list_before' => '', 'list_after' => ''
    15351541        );
    15361542
    15371543        $r = wp_parse_args( $args, $defaults );
     
    15991605
    16001606        $output = '';
    16011607
     1608        if ( '' != $r['title'] )
     1609                $output .= $r['title_before']. $r['title']. $r['title_after'];
     1610
    16021611        $last_changed = wp_cache_get( 'last_changed', 'posts' );
    16031612        if ( ! $last_changed ) {
    16041613                $last_changed = microtime();
     
    17301739                        }
    17311740                }
    17321741        }
     1742
    17331743        if ( $r['echo'] ) {
    17341744                echo $output;
    17351745        } else {
  • src/wp-includes/post-template.php

     
    11241124 *     @type string $title_li     List heading. Passing a null or empty value will result in no heading, and the list
    11251125 *                                will not be wrapped with unordered list `<ul>` tags. Default 'Pages'.
    11261126 *     @type Walker $walker       Walker instance to use for listing pages. Default empty (Walker_Page).
     1127 *     @type string $before       Text or HTML to precede the list of pages. Default <li class="pagenav">
     1128 *     @type string $after        Text or HTML to follow the list of pages. Default </li>
    11271129 * }
    11281130 * @return string|void HTML list of pages.
    11291131 */
     
    11351137                'title_li' => __( 'Pages' ), 'echo' => 1,
    11361138                'authors' => '', 'sort_column' => 'menu_order, post_title',
    11371139                'link_before' => '', 'link_after' => '', 'walker' => '',
     1140                'before' => '<li class="pagenav">', 'after' => '</li>'
    11381141        );
    11391142
    11401143        $r = wp_parse_args( $args, $defaults );
     
    11631166
    11641167        if ( ! empty( $pages ) ) {
    11651168                if ( $r['title_li'] ) {
    1166                         $output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
     1169                        $output .= $r['before'] . $r['title_li'] . '<ul>';
    11671170                }
    11681171                global $wp_query;
    11691172                if ( is_page() || is_attachment() || $wp_query->is_posts_page ) {
     
    11781181                $output .= walk_page_tree( $pages, $r['depth'], $current_page, $r );
    11791182
    11801183                if ( $r['title_li'] ) {
    1181                         $output .= '</ul></li>';
     1184                        $output .= '</ul>' . $r['after'];
    11821185                }
    11831186        }
    11841187