forked from mirror/_s
Avoid repeatedly checking specific post format.
Will only check for a specific post format if it’s a post format archive page. See https://core.trac.wordpress.org/changeset/30854 Fixes #664.
This commit is contained in:
parent
47ee126fb4
commit
37d283481f
|
@ -147,7 +147,8 @@ function the_archive_title( $before = '', $after = '' ) {
|
|||
$title = sprintf( __( 'Month: %s', '_s' ), get_the_date( _x( 'F Y', 'monthly archives date format', '_s' ) ) );
|
||||
} elseif ( is_day() ) {
|
||||
$title = sprintf( __( 'Day: %s', '_s' ), get_the_date( _x( 'F j, Y', 'daily archives date format', '_s' ) ) );
|
||||
} elseif ( is_tax( 'post_format', 'post-format-aside' ) ) {
|
||||
} elseif ( is_tax( 'post_format' ) ) {
|
||||
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
|
||||
$title = _x( 'Asides', 'post format archive title', '_s' );
|
||||
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
|
||||
$title = _x( 'Galleries', 'post format archive title', '_s' );
|
||||
|
@ -165,6 +166,7 @@ function the_archive_title( $before = '', $after = '' ) {
|
|||
$title = _x( 'Audio', 'post format archive title', '_s' );
|
||||
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
|
||||
$title = _x( 'Chats', 'post format archive title', '_s' );
|
||||
}
|
||||
} elseif ( is_post_type_archive() ) {
|
||||
$title = sprintf( __( 'Archives: %s', '_s' ), post_type_archive_title( '', false ) );
|
||||
} elseif ( is_tax() ) {
|
||||
|
|
Reference in New Issue