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 1bac45c395
commit 3007112d97
1 changed files with 1 additions and 1 deletions

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;