mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
e4bfd6ecc1
commit
9a3c274cb9
@ -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 × %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 × %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'],
|
||||
|
Loading…
Reference in New Issue
Block a user