Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/21/2010 10:41:37 PM (15 years ago)
Author:
boonebgorges
Message:

Decreases new mention count when activity items are deleted. Fixes #2082

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-filters.php

    r3340 r3468  
    103103}
    104104
     105/**
     106 * bp_activity_at_name_filter()
     107 *
     108 * Finds and links @-mentioned users in activity updates
     109 *
     110 * @package BuddyPress Activity
     111 *
     112 * @param string $content The activity content
     113 */
    105114function bp_activity_at_name_filter( $content ) {
    106115    include_once( ABSPATH . WPINC . '/registration.php' );
    107116
    108     $pattern = '/[@]+([A-Za-z0-9-_\.]+)/';
    109     preg_match_all( $pattern, $content, $usernames );
    110 
    111     // Make sure there's only one instance of each username
    112     if ( !$usernames = array_unique( $usernames[1] ) )
    113         return $content;
     117    $usernames = bp_activity_find_mentions( $content );
    114118
    115119    foreach( (array)$usernames as $username ) {
Note: See TracChangeset for help on using the changeset viewer.