WordPress.org

Make WordPress Core

Changeset 20003


Ignore:
Timestamp:
02/28/2012 03:10:53 AM (8 years ago)
Author:
lancewillett
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/image.php

    r19960 r20003  
    2020
    2121                        <div class="entry-meta">
     22                            test: <?php echo esc_attr( get_the_date( 'c' ) ); ?><br/>
     23                            test: <?php echo esc_html( get_the_date() ); ?>
    2224                            <?php
    2325                                $metadata = wp_get_attachment_metadata();
    24                                 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' ),
    25                                     esc_attr( get_the_time() ),
    26                                     get_the_date(),
     26                                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' ),
     27                                    esc_attr( get_the_date( 'c' ) ),
     28                                    esc_html( get_the_date() ),
    2729                                    esc_url( wp_get_attachment_url() ),
    2830                                    $metadata['width'],
Note: See TracChangeset for help on using the changeset viewer.