WordPress.org

Make WordPress Core

Changeset 34041


Ignore:
Timestamp:
09/11/2015 06:14:04 AM (6 years ago)
Author:
wonderboymusic
Message:

After [33961], pass $comment to get_comment_date() where possible to avoid extra cache/db lookups.

See #33638.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/comment.php

    r34039 r34041  
    196196            esc_url( get_comment_link( $comment->comment_ID ) ),
    197197            /* translators: comment date format. See http://php.net/date */
    198             get_comment_date( __( 'Y/m/d' ) ),
    199             get_comment_date( get_option( 'time_format' ) )
     198            get_comment_date( __( 'Y/m/d' ), $comment ),
     199            get_comment_date( get_option( 'time_format' ), $comment )
    200200        );
    201201    ?>
  • trunk/src/wp-includes/class-walker-comment.php

    r34040 r34041  
    272272            <?php
    273273                /* translators: 1: comment date, 2: comment time */
    274                 printf( __( '%1$s at %2$s' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
     274                printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)' ), '&nbsp;&nbsp;', '' );
    275275            ?>
    276276        </div>
     
    322322                                <?php
    323323                                    /* translators: 1: comment date, 2: comment time */
    324                                     printf( __( '%1$s at %2$s' ), get_comment_date(), get_comment_time() );
     324                                    printf( __( '%1$s at %2$s' ), get_comment_date( '', $comment ), get_comment_time() );
    325325                                ?>
    326326                            </time>
  • trunk/src/wp-includes/theme-compat/comments-popup.php

    r34039 r34041  
    5353    <li id="comment-<?php comment_ID() ?>">
    5454    <?php comment_text() ?>
    55     <p><cite><?php comment_type(); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link( $comment ), get_comment_date(), get_comment_ID(), get_comment_time()); ?></cite></p>
     55    <p><cite><?php comment_type(); ?> <?php printf(__('by %1$s &#8212; %2$s @ <a href="#comment-%3$s">%4$s</a>'), get_comment_author_link( $comment ), get_comment_date( '', $comment ), get_comment_ID(), get_comment_time()); ?></cite></p>
    5656    </li>
    5757
Note: See TracChangeset for help on using the changeset viewer.