This function has been deprecated. bbp_make_clickable() instead.
bbp_find_mentions( string $content = '' )
Searches through the content to locate usernames, designated by an @ sign.
Description
Parameters
- $content
-
(Optional) The content
Default value: ''
Return
(bool|array) $usernames Existing usernames. False if no matches.
Source
File: bp-forums/core/functions.php
function bbp_find_mentions( $content = '' ) {
$pattern = bbp_find_mentions_pattern();
preg_match_all( $pattern, $content, $usernames );
$usernames = array_unique( array_filter( $usernames[1] ) );
// Bail if no usernames
if ( empty( $usernames ) ) {
$usernames = false;
}
return apply_filters( 'bbp_find_mentions', $usernames, $pattern, $content );
}
Changelog
| Version | Description |
|---|---|
| 2.6.0 | bbp_make_clickable() |
| bbPress (r4323) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.