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,24 +147,26 @@ function the_archive_title( $before = '', $after = '' ) {
|
||||||
$title = sprintf( __( 'Month: %s', '_s' ), get_the_date( _x( 'F Y', 'monthly archives date format', '_s' ) ) );
|
$title = sprintf( __( 'Month: %s', '_s' ), get_the_date( _x( 'F Y', 'monthly archives date format', '_s' ) ) );
|
||||||
} elseif ( is_day() ) {
|
} elseif ( is_day() ) {
|
||||||
$title = sprintf( __( 'Day: %s', '_s' ), get_the_date( _x( 'F j, Y', 'daily archives date format', '_s' ) ) );
|
$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' ) ) {
|
||||||
$title = _x( 'Asides', 'post format archive title', '_s' );
|
if ( is_tax( 'post_format', 'post-format-aside' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
|
$title = _x( 'Asides', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Galleries', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
|
$title = _x( 'Galleries', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Images', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-image' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
|
$title = _x( 'Images', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Videos', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-video' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
|
$title = _x( 'Videos', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Quotes', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-quote' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
|
$title = _x( 'Quotes', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Links', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-link' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
|
$title = _x( 'Links', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Statuses', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-status' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
|
$title = _x( 'Statuses', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Audio', 'post format archive title', '_s' );
|
} elseif ( is_tax( 'post_format', 'post-format-audio' ) ) {
|
||||||
} elseif ( is_tax( 'post_format', 'post-format-chat' ) ) {
|
$title = _x( 'Audio', 'post format archive title', '_s' );
|
||||||
$title = _x( 'Chats', '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() ) {
|
} elseif ( is_post_type_archive() ) {
|
||||||
$title = sprintf( __( 'Archives: %s', '_s' ), post_type_archive_title( '', false ) );
|
$title = sprintf( __( 'Archives: %s', '_s' ), post_type_archive_title( '', false ) );
|
||||||
} elseif ( is_tax() ) {
|
} elseif ( is_tax() ) {
|
||||||
|
|
Reference in New Issue