Make WordPress Core

Changeset 17728


Ignore:
Timestamp:
04/27/2011 09:25:09 PM (11 years ago)
Author:
ryan
Message:

Translate default link labels for *posts_link(). Props nathanrice, CharlesClarkson. fixes #16998

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r17582 r17728  
    15801580 * @return string|null
    15811581 */
    1582 function get_next_posts_link( $label = 'Next Page »', $max_page = 0 ) {
     1582function get_next_posts_link( $label = null, $max_page = 0 ) {
    15831583    global $paged, $wp_query;
    15841584
     
    15901590
    15911591    $nextpage = intval($paged) + 1;
     1592       
     1593    if ( null === $label )
     1594        $label = __( 'Next Page »' );
    15921595
    15931596    if ( !is_single() && ( $nextpage <= $max_page ) ) {
     
    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 = null, $max_page = 0 ) {
    16091612    echo get_next_posts_link( $label, $max_page );
    16101613}
     
    16561659 * @return string|null
    16571660 */
    1658 function get_previous_posts_link( $label = '&laquo; Previous Page' ) {
     1661function get_previous_posts_link( $label = null ) {
    16591662    global $paged;
     1663
     1664    if ( null === $label )
     1665        $label = __( '&laquo; Previous Page' );
    16601666
    16611667    if ( !is_single() && $paged > 1 ) {
     
    16731679 * @param string $label Optional. Previous page link text.
    16741680 */
    1675 function previous_posts_link( $label = '&laquo; Previous Page' ) {
     1681function previous_posts_link( $label = null ) {
    16761682    echo get_previous_posts_link( $label );
    16771683}
Note: See TracChangeset for help on using the changeset viewer.