Twenty Twelve: use `get_the_date()` rather than `the_date()` in content templates to ensure a date is always output and a post permalink is visible to site visitors. Props obenland and ocean90, fixes #21721.

git-svn-id: http://core.svn.wordpress.org/trunk@21670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2012-08-30 17:23:22 +00:00
parent 4d5ccda0c2
commit 670249944e
4 changed files with 4 additions and 4 deletions

View File

@ -18,6 +18,6 @@
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
</footer><!-- .entry-meta -->
</article><!-- #post -->

View File

@ -15,6 +15,6 @@
<footer class="entry-meta">
<h1><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<h2><?php the_date(); ?></h2>
<h2><?php echo get_the_date(); ?></h2>
</footer><!-- .entry-meta -->
</article><!-- #post -->

View File

@ -16,6 +16,6 @@
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
</footer><!-- .entry-meta -->
</article><!-- #post -->

View File

@ -15,6 +15,6 @@
<footer class="entry-meta">
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_date(); ?></a>
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
</footer><!-- .entry-meta -->
</article><!-- #post -->