Make WordPress Core

Changeset 21670


Ignore:
Timestamp:
08/30/2012 05:23:22 PM (12 years ago)
Author:
lancewillett
Message:

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.

Location:
trunk/wp-content/themes/twentytwelve
Files:
4 edited

Legend:

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

    r21618 r21670  
    1919    <footer class="entry-meta">
    2020        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
    21         <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>
     21        <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>
    2222    </footer><!-- .entry-meta -->
    2323</article><!-- #post -->
  • trunk/wp-content/themes/twentytwelve/content-image.php

    r21369 r21670  
    1616        <footer class="entry-meta">
    1717            <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>
    18             <h2><?php the_date(); ?></h2>
     18            <h2><?php echo get_the_date(); ?></h2>
    1919        </footer><!-- .entry-meta -->
    2020    </article><!-- #post -->
  • trunk/wp-content/themes/twentytwelve/content-link.php

    r21369 r21670  
    1717        <footer class="entry-meta">
    1818            <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
    19             <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>
     19            <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>
    2020        </footer><!-- .entry-meta -->
    2121    </article><!-- #post -->
  • trunk/wp-content/themes/twentytwelve/content-quote.php

    r21369 r21670  
    1616    <footer class="entry-meta">
    1717        <?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<div class="edit-link">', '</div>' ); ?>
    18         <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>
     18        <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>
    1919    </footer><!-- .entry-meta -->
    2020</article><!-- #post -->
Note: See TracChangeset for help on using the changeset viewer.