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

props psoluch, rob1n.
fixes #16468.
Built from https://develop.svn.wordpress.org/trunk@28250


git-svn-id: http://core.svn.wordpress.org/trunk@28078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-05-04 13:17:28 +00:00
parent 0b08cd7a25
commit 2c97f4640b
5 changed files with 5 additions and 5 deletions

View File

@ -39,7 +39,7 @@
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
?></title>

View File

@ -484,7 +484,7 @@ function twentyfourteen_wp_title( $title, $sep ) {
}
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 ) {
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentyfourteen' ), max( $paged, $page ) );
}

View File

@ -29,7 +29,7 @@
echo " | $site_description";
// Add a page number if necessary:
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
?></title>

View File

@ -214,7 +214,7 @@ function twentythirteen_wp_title( $title, $sep ) {
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
return $title;

View File

@ -209,7 +209,7 @@ function twentytwelve_wp_title( $title, $sep ) {
$title = "$title $sep $site_description";
// Add a page number if necessary.
if ( $paged >= 2 || $page >= 2 )
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
$title = "$title $sep " . sprintf( __( 'Page %s', 'twentytwelve' ), max( $paged, $page ) );
return $title;