Make WordPress Core

Ticket #17385: 17385.diff

File 17385.diff, 12.9 KB (added by sorich87, 14 years ago)
  • wp-content/themes/twentyeleven/content-single.php

     
    1313                <h1 class="entry-title"><?php the_title(); ?></h1>
    1414
    1515                <div class="entry-meta">
    16                         <?php
    17                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    18                                         get_permalink(),
    19                                         get_the_date( 'c' ),
    20                                         get_the_date(),
    21                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    22                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    23                                         get_the_author()
    24                                 );
    25                         ?>
     16                        <?php twentyeleven_posted_on(); ?>
    2617                </div><!-- .entry-meta -->
    2718        </header><!-- .entry-header -->
    2819
  • wp-content/themes/twentyeleven/content-aside.php

     
    33 * The template for displaying posts in the Aside Post Format on index and archive pages
    44 *
    55 * Learn more: http://codex.wordpress.org/Post_Formats
    6  * 
     6 *
    77 * @package WordPress
    88 * @subpackage Twenty_Eleven
    99 * @since Twenty Eleven 1.0
     
    1919
    2020                        <?php if ( 'post' == $post->post_type ) : ?>
    2121                        <?php endif; ?>
    22                        
     22
    2323                        <?php if ( comments_open() ) : ?>
    2424                        <div class="comments-link">
    2525                                <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
     
    3939                <?php endif; ?>
    4040
    4141                <footer class="entry-meta">
    42                         <?php
    43                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    44                                         get_permalink(),
    45                                         get_the_date( 'c' ),
    46                                         get_the_date(),
    47                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    48                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    49                                         get_the_author()
    50                                 );
    51                         ?>
     42                        <?php twentyeleven_posted_on(); ?>
    5243                        <?php if ( comments_open() ) : ?>
    5344                        <span class="sep"> | </span>
    5445                        <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  • wp-content/themes/twentyeleven/content-link.php

     
    33 * The template for displaying posts in the Link Post Format on index and archive pages
    44 *
    55 * Learn more: http://codex.wordpress.org/Post_Formats
    6  * 
     6 *
    77 * @package WordPress
    88 * @subpackage Twenty_Eleven
    99 * @since Twenty Eleven 1.0
     
    3939                <?php endif; ?>
    4040
    4141                <footer class="entry-meta">
    42                         <?php
    43                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    44                                         get_permalink(),
    45                                         get_the_date( 'c' ),
    46                                         get_the_date(),
    47                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    48                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    49                                         get_the_author()
    50                                 );
    51                         ?>
     42                        <?php twentyeleven_posted_on(); ?>
    5243                        <?php if ( comments_open() ) : ?>
    5344                        <span class="sep"> | </span>
    5445                        <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  • wp-content/themes/twentyeleven/content-featured.php

     
    1414                <h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
    1515
    1616                <div class="entry-meta">
    17                         <?php
    18                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    19                                         get_permalink(),
    20                                         get_the_date( 'c' ),
    21                                         get_the_date(),
    22                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    23                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    24                                         get_the_author()
    25                                 );
    26                         ?>
     17                        <?php twentyeleven_posted_on(); ?>
    2718                </div><!-- .entry-meta -->
    2819        </header><!-- .entry-header -->
    2920
  • wp-content/themes/twentyeleven/content.php

     
    2121
    2222                        <?php if ( 'post' == $post->post_type ) : ?>
    2323                        <div class="entry-meta">
    24                                 <?php
    25                                         printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    26                                                 get_permalink(),
    27                                                 get_the_date( 'c' ),
    28                                                 get_the_date(),
    29                                                 get_author_posts_url( get_the_author_meta( 'ID' ) ),
    30                                                 sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    31                                                 get_the_author()
    32                                         );
    33                                 ?>
     24                                <?php twentyeleven_posted_on(); ?>
    3425                        </div><!-- .entry-meta -->
    3526                        <?php endif; ?>
    3627
  • wp-content/themes/twentyeleven/content-image.php

     
    3838                <footer class="entry-meta">
    3939                        <?php if ( 'post' == $post->post_type ) : // Hide category and tag text for pages on Search ?>
    4040                        <div class="entry-meta">
    41                                 <?php
    42                                         printf( __( '<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    43                                                 get_permalink(),
    44                                                 get_the_date( 'c' ),
    45                                                 get_the_date(),
    46                                                 get_author_posts_url( get_the_author_meta( 'ID' ) ),
    47                                                 sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    48                                                 get_the_author()
    49                                         );
    50                                 ?>
     41                                <?php twentyeleven_posted_on(); ?>
    5142                        </div><!-- .entry-meta -->
    5243                        <div class="entry-meta">
    5344                                <span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'twentyeleven' ); ?></span><?php the_category( ', ' ); ?></span>
  • wp-content/themes/twentyeleven/content-status.php

     
    33 * The template for displaying posts in the Status Post Format on index and archive pages
    44 *
    55 * Learn more: http://codex.wordpress.org/Post_Formats
    6  * 
     6 *
    77 * @package WordPress
    88 * @subpackage Twenty_Eleven
    99 */
     
    1818
    1919                        <?php if ( 'post' == $post->post_type ) : ?>
    2020                        <?php endif; ?>
    21                        
     21
    2222                        <?php if ( comments_open() ) : ?>
    2323                        <div class="comments-link">
    2424                                <?php comments_popup_link( __( '<span class="leave-reply">Reply</span>', 'twentyeleven' ), __( '1', 'twentyeleven' ), __( '%', 'twentyeleven' ) ); ?>
     
    3333                <?php else : ?>
    3434                <div class="entry-content">
    3535                        <div class="avatar"><?php echo get_avatar( $post->post_author, apply_filters( 'twentyeleven_status_avatar', '65' ) ); ?></div>
    36                        
     36
    3737                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    3838                        <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyeleven' ), 'after' => '</div>' ) ); ?>
    3939                </div><!-- .entry-content -->
    4040                <?php endif; ?>
    4141
    4242                <footer class="entry-meta">
    43                         <?php
    44                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    45                                         get_permalink(),
    46                                         get_the_date( 'c' ),
    47                                         get_the_date(),
    48                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    49                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    50                                         get_the_author()
    51                                 );
    52                         ?>
     43                        <?php twentyeleven_posted_on(); ?>
    5344                        <?php if ( comments_open() ) : ?>
    5445                        <span class="sep"> | </span>
    5546                        <span class="comments-link"><?php comments_popup_link( __( '<span class="leave-reply">Leave a reply</span>', 'twentyeleven' ), __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?></span>
  • wp-content/themes/twentyeleven/content-quote.php

     
    1717
    1818                        <?php if ( 'post' == $post->post_type ) : ?>
    1919                        <div class="entry-meta">
    20                                 <?php
    21                                         printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    22                                                 get_permalink(),
    23                                                 get_the_date( 'c' ),
    24                                                 get_the_date(),
    25                                                 get_author_posts_url( get_the_author_meta( 'ID' ) ),
    26                                                 sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    27                                                 get_the_author()
    28                                         );
    29                                 ?>
     20                                <?php twentyeleven_posted_on(); ?>
    3021                        </div><!-- .entry-meta -->
    3122                        <?php endif; ?>
    3223
  • wp-content/themes/twentyeleven/content-gallery.php

     
    1818                </hgroup>
    1919
    2020                <div class="entry-meta">
    21                         <?php
    22                                 printf( __( '<span class="sep">Posted on </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'twentyeleven' ),
    23                                         get_permalink(),
    24                                         get_the_date( 'c' ),
    25                                         get_the_date(),
    26                                         get_author_posts_url( get_the_author_meta( 'ID' ) ),
    27                                         sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
    28                                         get_the_author()
    29                                 );
    30                         ?>
     21                        <?php twentyeleven_posted_on(); ?>
    3122                </div><!-- .entry-meta -->
    3223        </header><!-- .entry-header -->
    3324
  • wp-content/themes/twentyeleven/functions.php

     
    558558                        break;
    559559        endswitch;
    560560}
    561 endif; // ends check for twentyeleven_comment()
    562  No newline at end of file
     561endif; // ends check for twentyeleven_comment()
     562
     563if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
     564/**
     565 * Prints HTML with meta information for the current post-date/time and author.
     566 *
     567 * @since Twenty Eleven 1.0
     568 */
     569function twentyeleven_posted_on() {
     570        printf( __( '<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s">%7$s</a></span>', 'twentyeleven' ),
     571                get_permalink(),
     572                esc_attr( get_the_time() ),
     573                get_the_date( 'c' ),
     574                get_the_date(),
     575                get_author_posts_url( get_the_author_meta( 'ID' ) ),
     576                sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
     577                get_the_author()
     578        );
     579}
     580endif;