bp_activity_maybe_load_mentions_scripts()
Should BuddyPress load the mentions scripts and related assets, including results to prime the mentions suggestions?
Description
Return
(bool) True if mentions scripts should be loaded.
Source
File: bp-activity/bp-activity-functions.php
function bp_activity_maybe_load_mentions_scripts() {
$mentions_enabled = bp_activity_do_mentions() && bp_is_user_active();
$load_mentions = $mentions_enabled && ( bp_is_activity_component() || is_admin() );
/**
* Filters whether or not BuddyPress should load mentions scripts and assets.
*
* @since BuddyPress 2.1.0
*
* @param bool $load_mentions True to load mentions assets, false otherwise.
* @param bool $mentions_enabled True if mentions are enabled.
*/
return (bool) apply_filters( 'bp_activity_maybe_load_mentions_scripts', $load_mentions, $mentions_enabled );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.1.0 | 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.