From a8723b832a8bc4b1c925b5c5ba7bd16830940770 Mon Sep 17 00:00:00 2001 From: Caleb Burks Date: Thu, 16 Jan 2020 00:14:38 -0500 Subject: [PATCH] Use same filter to control email display --- common/php/class-module.php | 2 +- modules/editorial-comments/editorial-comments.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/common/php/class-module.php b/common/php/class-module.php index 468adbc03..95842ab5d 100644 --- a/common/php/class-module.php +++ b/common/php/class-module.php @@ -504,7 +504,7 @@ function users_select_form( $selected = null, $args = null ) { display_name ); ?> - + ID ) ) : ?> user_email ); ?> diff --git a/modules/editorial-comments/editorial-comments.php b/modules/editorial-comments/editorial-comments.php index 6f7d488b8..e267030a7 100644 --- a/modules/editorial-comments/editorial-comments.php +++ b/modules/editorial-comments/editorial-comments.php @@ -286,6 +286,10 @@ function the_comment($comment, $args, $depth) { } } + $escaped_comment_author = esc_html( $comment->comment_author ); + if ( apply_filters( 'ef_display_user_email_address', true, $comment->user_id ) ) { + $escaped_comment_author = get_comment_author_email_link( $comment->comment_author ); + } ?>
  • comment_ID) ) ); ?>> @@ -295,7 +299,7 @@ function the_comment($comment, $args, $depth) {
    %1$s said on %2$s at %3$s', 'edit-flow'), - esc_html( $comment->comment_author ), + $escaped_comment_author, get_comment_date( get_option( 'date_format' ) ), get_comment_time() ); ?>