diff --git a/wp-includes/class-walker-comment.php b/wp-includes/class-walker-comment.php index 5bfcac0ed3..87834f52be 100644 --- a/wp-includes/class-walker-comment.php +++ b/wp-includes/class-walker-comment.php @@ -263,6 +263,14 @@ class Walker_Comment extends Walker { $tag = 'li'; $add_below = 'div-comment'; } + + $commenter = wp_get_current_commenter(); + if ( $commenter['comment_author_email'] ) { + $moderation_note = __( 'Your comment is awaiting moderation.' ); + } else { + $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' ); + } + ?> < has_children ? 'parent' : '', $comment ); ?> id="comment-"> @@ -282,7 +290,7 @@ class Walker_Comment extends Walker { ?> comment_approved ) : ?> - +
@@ -345,6 +353,14 @@ class Walker_Comment extends Walker { */ protected function html5_comment( $comment, $depth, $args ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; + + $commenter = wp_get_current_commenter(); + if ( $commenter['comment_author_email'] ) { + $moderation_note = __( 'Your comment is awaiting moderation.' ); + } else { + $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' ); + } + ?> < id="comment-" has_children ? 'parent' : '', $comment ); ?>>
@@ -376,7 +392,7 @@ class Walker_Comment extends Walker { comment_approved ) : ?> -

+ diff --git a/wp-includes/version.php b/wp-includes/version.php index 9e27b672f9..5850697782 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-beta1-44680'; +$wp_version = '5.1-beta1-44681'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.