Twenty Twelve: use the time element for image attachment views, and `esc_html()` for `get_the_date()` in the element's output. Props iandstewart, see #19978.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
lancewillett 2012-02-28 03:10:53 +00:00
parent e4bfd6ecc1
commit 9a3c274cb9
1 changed files with 5 additions and 3 deletions

View File

@ -19,11 +19,13 @@ get_header(); ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-meta">
test: <?php echo esc_attr( get_the_date( 'c' ) ); ?><br/>
test: <?php echo esc_html( get_the_date() ); ?>
<?php
$metadata = wp_get_attachment_metadata();
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentytwelve' ),
esc_attr( get_the_time() ),
get_the_date(),
printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'twentytwelve' ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( wp_get_attachment_url() ),
$metadata['width'],
$metadata['height'],