mirror of
https://github.com/WordPress/WordPress.git
synced 2025-04-15 08:25:44 +02:00
Twenty Fifteen: Use the new archive template tags and make archive template titling way simpler!
Props obenland, fixes #30246. Built from https://develop.svn.wordpress.org/trunk@30236 git-svn-id: http://core.svn.wordpress.org/trunk@30236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0952952ef7
commit
2047ff9e5a
@ -25,65 +25,9 @@ get_header(); ?>
|
||||
<?php if ( have_posts() ) : ?>
|
||||
|
||||
<header class="page-header">
|
||||
<h1 class="page-title">
|
||||
<?php
|
||||
if ( is_category() ) :
|
||||
single_cat_title();
|
||||
|
||||
elseif ( is_tag() ) :
|
||||
single_tag_title();
|
||||
|
||||
elseif ( is_author() ) :
|
||||
printf( esc_html__( 'Author: %s', 'twentyfifteen' ), '<span class="vcard">' . get_the_author() . '</span>' );
|
||||
|
||||
elseif ( is_day() ) :
|
||||
printf( esc_html__( 'Day: %s', 'twentyfifteen' ), get_the_date() );
|
||||
|
||||
elseif ( is_month() ) :
|
||||
printf( esc_html__( 'Month: %s', 'twentyfifteen' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'twentyfifteen' ) ) );
|
||||
|
||||
elseif ( is_year() ) :
|
||||
printf( esc_html__( 'Year: %s', 'twentyfifteen' ), get_the_date( _x( 'Y', 'yearly archives date format', 'twentyfifteen' ) ) );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
|
||||
esc_html_e( 'Asides', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
|
||||
esc_html_e( 'Galleries', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
|
||||
esc_html_e( 'Images', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
|
||||
esc_html_e( 'Videos', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
|
||||
esc_html_e( 'Quotes', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
|
||||
esc_html_e( 'Links', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
|
||||
esc_html_e( 'Statuses', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
|
||||
esc_html_e( 'Audios', 'twentyfifteen' );
|
||||
|
||||
elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
|
||||
esc_html_e( 'Chats', 'twentyfifteen' );
|
||||
|
||||
else :
|
||||
esc_html_e( 'Archives', 'twentyfifteen' );
|
||||
|
||||
endif;
|
||||
?>
|
||||
</h1>
|
||||
<?php
|
||||
// Show an optional term description.
|
||||
$term_description = term_description();
|
||||
if ( ! empty( $term_description ) ) :
|
||||
printf( '<div class="taxonomy-description">%s</div>', $term_description );
|
||||
endif;
|
||||
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
||||
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
||||
?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30235';
|
||||
$wp_version = '4.1-alpha-30236';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user