bp_activity_do_mentions

Are mentions enabled or disabled?.

Description

bp_activity_do_mentions(); 

The Mentions feature does a number of things, all of which will be turned off if you disable mentions: - Detecting and auto-linking @username in all BP/WP content. - Sending BP notifications and emails to users when they are mentioned - The Public Message button on user profiles.

Mentions are enabled by default. To disable, put the following line in bp-custom.php or your theme's functions.php file:

add_filter( bp_activity_do_mentions,, __return_false );


Usage

  1. if ( !function_exists( 'bp_activity_do_mentions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_activity_do_mentions(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_do_mentions() { 
  2.  
  3. /** 
  4. * Filters whether or not mentions are enabled. 
  5. * @since 1.8.0 
  6. * @param bool $enabled True to enable mentions, false to disable. 
  7. */ 
  8. return (bool) apply_filters( 'bp_activity_do_mentions', true );