WordPress.org

Make WordPress Core

Ticket #16998: 16998.diff

File 16998.diff, 2.2 KB (added by CharlesClarkson, 7 years ago)
  • wp-includes/link-template.php

     
    15751575 *
    15761576 * @since 2.7.0
    15771577 *
    1578  * @param string $label Content for link text.
     1578 * @param string $label Optional. Content for link text.
    15791579 * @param int $max_page Optional. Max pages.
    15801580 * @return string|null
    15811581 */
    1582 function get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) {
     1582function get_next_posts_link( $label = '', $max_page = 0 ) {
    15831583        global $paged, $wp_query;
    15841584
    15851585        if ( !$max_page )
     
    15901590
    15911591        $nextpage = intval($paged) + 1;
    15921592
     1593        if ( empty( $label ) )
     1594                $label = __( 'Next Page »' );
     1595
    15931596        if ( !is_single() && ( $nextpage <= $max_page ) ) {
    15941597                $attr = apply_filters( 'next_posts_link_attributes', '' );
    15951598                return '<a href="' . next_posts( $max_page, false ) . "\" $attr>" . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&#038;$1', $label) . '</a>';
     
    16021605 * @since 0.71
    16031606 * @uses get_next_posts_link()
    16041607 *
    1605  * @param string $label Content for link text.
     1608 * @param string $label Optional. Content for link text.
    16061609 * @param int $max_page Optional. Max pages.
    16071610 */
    1608 function next_posts_link( $label = 'Next Page &raquo;', $max_page = 0 ) {
     1611function next_posts_link( $label = '', $max_page = 0 ) {
    16091612        echo get_next_posts_link( $label, $max_page );
    16101613}
    16111614
     
    16551658 * @param string $label Optional. Previous page link text.
    16561659 * @return string|null
    16571660 */
    1658 function get_previous_posts_link( $label = '&laquo; Previous Page' ) {
     1661function get_previous_posts_link( $label = '' ) {
    16591662        global $paged;
    16601663
     1664        if ( empty( $label ) )
     1665                $label = __( '&laquo; Previous Page' );
     1666
    16611667        if ( !is_single() && $paged > 1 ) {
    16621668                $attr = apply_filters( 'previous_posts_link_attributes', '' );
    16631669                return '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label ) .'</a>';
     
    16721678 *
    16731679 * @param string $label Optional. Previous page link text.
    16741680 */
    1675 function previous_posts_link( $label = '&laquo; Previous Page' ) {
     1681function previous_posts_link( $label = '' ) {
    16761682        echo get_previous_posts_link( $label );
    16771683}
    16781684