Skip to content

Commit

Permalink
Merge pull request #32 from Hackkzy/master
Browse files Browse the repository at this point in the history
v1.7.8
  • Loading branch information
BhargavBhandari90 authored Feb 21, 2024
2 parents ded8f65 + 8df3fb9 commit 7bf2f14
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.

Expand Down
5 changes: 3 additions & 2 deletions app/main/class-comment-mention.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)/', "<a class='comment-mention' href='$author_url' rel='nofollow'>@$username</a>", $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)/', "<a class='comment-mention' href='$author_url' rel='nofollow'>@$mentioned_name</a>", $content );
}

// Put everything back.
Expand Down
4 changes: 2 additions & 2 deletions comment-mention.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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' ) ) {
/**
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`.

Expand Down

0 comments on commit 7bf2f14

Please sign in to comment.