WordPress.org

Make WordPress Core

Changeset 28250


Ignore:
Timestamp:
05/04/2014 01:16:30 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Prevent 'Page %s' from being added to page title on 404 error pages in bundled themes.

props psoluch, rob1n.
fixes #16468.

Location:
trunk/src/wp-content/themes
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/header.php

    r27569 r28250  
    4040
    4141    // Add a page number if necessary:
    42     if ( $paged >= 2 || $page >= 2 )
     42    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    4343        echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    4444
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r27763 r28250  
    485485
    486486    // Add a page number if necessary.
    487     if ( $paged >= 2 || $page >= 2 ) {
     487    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    488488        $title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
    489489    }
  • trunk/src/wp-content/themes/twentyten/header.php

    r25746 r28250  
    3030
    3131    // Add a page number if necessary:
    32     if ( $paged >= 2 || $page >= 2 )
     32    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    3333        echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
    3434
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r27763 r28250  
    215215
    216216    // Add a page number if necessary.
    217     if ( $paged >= 2 || $page >= 2 )
     217    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    218218        $title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
    219219
  • trunk/src/wp-content/themes/twentytwelve/functions.php

    r27606 r28250  
    210210
    211211    // Add a page number if necessary.
    212     if ( $paged >= 2 || $page >= 2 )
     212    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    213213        $title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
    214214
Note: See TracChangeset for help on using the changeset viewer.