From 0cba1f525223956c0de300e3ac80feb6b099e20e Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Wed, 13 Sep 2023 07:19:32 -0500 Subject: [PATCH] Make the post title a link in comment notification emails. See #3242. --- wp-content/plugins/wds-citytech/includes/email.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wp-content/plugins/wds-citytech/includes/email.php b/wp-content/plugins/wds-citytech/includes/email.php index 4b39aedf29..0742e61ced 100644 --- a/wp-content/plugins/wds-citytech/includes/email.php +++ b/wp-content/plugins/wds-citytech/includes/email.php @@ -802,13 +802,15 @@ function ol_comment_moderation_text( $notify_message, $comment_id ) { /** * Adds 'Hello' and footer 'note' to comment-related emails. * - * Also makes the post URL a link. + * Also makes the post title a link. */ function openlab_comment_email_boilerplate( $content, $comment_id ) { - $post_id = get_comment( $comment_id )->comment_post_ID; - $post_url = get_permalink( $post_id ); + $post_id = get_comment( $comment_id )->comment_post_ID; + $post_url = get_permalink( $post_id ); + $post_title = get_the_title( $post_id ); - $content = str_replace( '
' . $post_url, '
' . $post_url . '', $content ); + $content = str_replace( '
' . $post_url, '', $content ); + $content = str_replace( '"' . $post_title . '"', '' . $post_title . '', $content ); return sprintf( 'Hello,' . "

" .