From 7260020026b8633bc6d082362b3206376990ed38 Mon Sep 17 00:00:00 2001 From: Hackkzy Date: Tue, 20 Feb 2024 16:09:07 +0530 Subject: [PATCH 1/3] Minor changes --- app/main/class-comment-mention.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/main/class-comment-mention.php b/app/main/class-comment-mention.php index 7307768..31f416e 100644 --- a/app/main/class-comment-mention.php +++ b/app/main/class-comment-mention.php @@ -195,8 +195,9 @@ public function cmt_mntn_at_name_filter( $content ) { // Linkify the mentions with the username. foreach ( (array) $usernames as $user_id => $username ) { - $author_url = get_author_posts_url( $user_id ); - $content = preg_replace( '/(@' . $username . '\b)/', "@$username", $content ); + $author_url = get_author_posts_url( $user_id ); + $mentioned_name = apply_filters( 'cmnt_mntn_replace_mentioned_name', $username, $user_id ); + $content = preg_replace( '/(@' . $username . '\b)/', "@$mentioned_name", $content ); } // Put everything back. From 0c6c599774de15defc661a1319cf18f7fc32b3f3 Mon Sep 17 00:00:00 2001 From: Hackkzy Date: Wed, 21 Feb 2024 12:27:00 +0530 Subject: [PATCH 2/3] Version updated to 1.7.8 --- comment-mention.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comment-mention.php b/comment-mention.php index bc0772e..4fe160b 100644 --- a/comment-mention.php +++ b/comment-mention.php @@ -6,7 +6,7 @@ * Author URI: https://bhargavb.com * Text Domain: comment-mention * Domain Path: /languages - * Version: 1.7.7 + * Version: 1.7.8 * * @package Comment_Mention */ @@ -21,7 +21,7 @@ /** * The version of the plugin. */ - define( 'CMT_MNTN_VERSION', '1.7.7' ); + define( 'CMT_MNTN_VERSION', '1.7.8' ); } if ( ! defined( 'CMT_MNTN_PATH' ) ) { /** From 8df3fb95e30a9cc138bf05f167946dc463b56c15 Mon Sep 17 00:00:00 2001 From: Hackkzy Date: Wed, 21 Feb 2024 12:27:41 +0530 Subject: [PATCH 3/3] Changelog Updated --- README.md | 5 ++++- readme.txt | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ba4e6f..98a7a12 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ **Tags:** comments, mention, email, user, bbpress **Requires at least:** 4.6 **Tested up to:** 6.4.3 -**Stable tag:** 1.7.7 +**Stable tag:** 1.7.8 **Requires PHP:** 5.6 **License:** GPLv2 or later **License URI:** https://www.gnu.org/licenses/gpl-2.0.html @@ -62,6 +62,9 @@ e.g. ## Changelog ## +### 1.7.8 ### +* Hook added : `cmnt_mntn_replace_mentioned_name`. + ### 1.7.7 ### * Bug Fix : Unable to mention user on freshly installed `Comment Mention`. diff --git a/readme.txt b/readme.txt index 3a483b4..375dd1c 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BnB90/50 Tags: comments, mention, email, user, bbpress Requires at least: 4.6 Tested up to: 6.4.3 -Stable tag: 1.7.7 +Stable tag: 1.7.8 Requires PHP: 5.6 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -62,6 +62,9 @@ e.g. == Changelog == += 1.7.8 = +* Hook added : `cmnt_mntn_replace_mentioned_name`. + = 1.7.7 = * Bug Fix : Unable to mention user on freshly installed `Comment Mention`.