Make WordPress Core

Ticket #47461: 47461.diff

File 47461.diff, 4.9 KB (added by birgire, 6 years ago)
  • src/wp-content/themes/twentyeleven/functions.php

    diff --git src/wp-content/themes/twentyeleven/functions.php src/wp-content/themes/twentyeleven/functions.php
    index 52b53ba..d3546af 100644
    if ( ! function_exists( 'twentyeleven_comment' ) ) : 
    743743                                                <?php edit_comment_link( __( 'Edit', 'twentyeleven' ), '<span class="edit-link">', '</span>' ); ?>
    744744                                        </div><!-- .comment-author .vcard -->
    745745
    746                                         <?php if ( $comment->comment_approved == '0' ) : ?>
    747                                         <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
     746                                        <?php
     747                                        $commenter = wp_get_current_commenter();
     748                                        if ( $commenter['comment_author_email'] ) {
     749                                                $moderation_note = __( 'Your comment is awaiting moderation.', 'twentyeleven' );
     750                                        } else {
     751                                                $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentyeleven' );
     752                                        }
     753                                        ?>
     754
     755                                        <?php if ( '0' == $comment->comment_approved ) : ?>
     756                                        <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em>
    748757                                        <br />
    749                                 <?php endif; ?>
     758                                        <?php endif; ?>
    750759
    751760                                </footer>
    752761
  • src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php

    diff --git src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php
    index cab6bec..30f8f83 100644
    class TwentyNineteen_Walker_Comment extends Walker_Comment { 
    8888                                                ?>
    8989                                        </div><!-- .comment-metadata -->
    9090
     91                                        <?php
     92                                        $commenter = wp_get_current_commenter();
     93                                        if ( $commenter['comment_author_email'] ) {
     94                                                $moderation_note = __( 'Your comment is awaiting moderation.', 'twentynineteen' );
     95                                        } else {
     96                                                $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentynineteen' );
     97                                        }
     98                                        ?>
     99
    91100                                        <?php if ( '0' == $comment->comment_approved ) : ?>
    92                                         <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentynineteen' ); ?></p>
     101                                        <p class="comment-awaiting-moderation"><?php echo $moderation_note; ?></p>
    93102                                        <?php endif; ?>
     103
    94104                                </footer><!-- .comment-meta -->
    95105
    96106                                <div class="comment-content">
  • src/wp-content/themes/twentyten/functions.php

    diff --git src/wp-content/themes/twentyten/functions.php src/wp-content/themes/twentyten/functions.php
    index 2de25d3..bbceb06 100644
    if ( ! function_exists( 'twentyten_comment' ) ) : 
    425425                                <?php echo get_avatar( $comment, 40 ); ?>
    426426                                <?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    427427                        </div><!-- .comment-author .vcard -->
    428                                 <?php if ( $comment->comment_approved == '0' ) : ?>
    429                                 <em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
    430                                 <br />
     428
     429                        <?php
     430                        $commenter = wp_get_current_commenter();
     431                        if ( $commenter['comment_author_email'] ) {
     432                                $moderation_note = __( 'Your comment is awaiting moderation.', 'twentyten' );
     433                        } else {
     434                                $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentyten' );
     435                        }
     436                        ?>
     437
     438                        <?php if ( '0' == $comment->comment_approved ) : ?>
     439                        <em class="comment-awaiting-moderation"><?php echo $moderation_note; ?></em>
     440                        <br />
    431441                        <?php endif; ?>
    432442
    433443                        <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
  • src/wp-content/themes/twentytwelve/functions.php

    diff --git src/wp-content/themes/twentytwelve/functions.php src/wp-content/themes/twentytwelve/functions.php
    index ad89b2a..d09f52e 100644
    if ( ! function_exists( 'twentytwelve_comment' ) ) : 
    442442                                ?>
    443443                                </header><!-- .comment-meta -->
    444444
     445                                <?php
     446                                $commenter = wp_get_current_commenter();
     447                                if ( $commenter['comment_author_email'] ) {
     448                                        $moderation_note = __( 'Your comment is awaiting moderation.', 'twentytwelve' );
     449                                } else {
     450                                        $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.', 'twentytwelve' );
     451                                }
     452                                ?>
     453
    445454                                <?php if ( '0' == $comment->comment_approved ) : ?>
    446                                 <p class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentytwelve' ); ?></p>
    447                         <?php endif; ?>
     455                                <p class="comment-awaiting-moderation"><?php echo $moderation_note; ?></p>
     456                                <?php endif; ?>
    448457
    449458                                <section class="comment-content comment">
    450459                                <?php comment_text(); ?>