WordPress.org

Make WordPress Core

Ticket #10667: search-pagination-1.diff

File search-pagination-1.diff, 2.6 KB (added by andy, 8 years ago)
  • wp-content/themes/twentyten/search.php

     
    99
    1010<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
    1111                                <div id="nav-above" class="navigation">
    12                                         <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' )) ?></div>
    13                                         <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
     12                                        <div class="nav-previous"><?php previous_posts_link(__( '<span class="meta-nav">&larr;</span> Previous results', 'twentyten' )) ?></div>
     13                                        <div class="nav-next"><?php next_posts_link(__( 'Next results <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
    1414                                </div><!-- #nav-above -->
    1515<?php } ?>
    1616
     
    4949
    5050<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
    5151                                <div id="nav-below" class="navigation">
    52                                         <div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' )) ?></div>
    53                                         <div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
     52                                        <div class="nav-previous"><?php previous_posts_link(__( '<span class="meta-nav">&larr;</span> Previous results', 'twentyten' )) ?></div>
     53                                        <div class="nav-next"><?php next_posts_link(__( 'Next results <span class="meta-nav">&rarr;</span>', 'twentyten' )) ?></div>
    5454                                </div><!-- #nav-below -->
    5555<?php } ?>
    5656
  • wp-includes/link-template.php

     
    14081408        $nextpage = intval($paged) + 1;
    14091409
    14101410        if ( !is_single() && ( empty($paged) || $nextpage <= $max_page) ) {
     1411                $label = apply_filters( 'next_posts_link_label', $label );
    14111412                $attr = apply_filters( 'next_posts_link_attributes', '' );
    14121413                return '<a href="' . next_posts( $max_page, false ) . "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) .'</a>';
    14131414        }
     
    14761477        global $paged;
    14771478
    14781479        if ( !is_single() && $paged > 1 ) {
     1480                $label = apply_filters( 'previous_posts_link_label', $label );
    14791481                $attr = apply_filters( 'previous_posts_link_attributes', '' );
    14801482                return '<a href="' . previous_posts( false ) . "\" $attr>". preg_replace( '/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label ) .'</a>';
    14811483        }