bp_activity_do_mentions()

Are mentions enabled or disabled?

Description

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 using the @username syntax.
  • 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’ );

Return

(bool) $retval True to enable mentions, false to disable.

Source

File: bp-activity/bp-activity-functions.php

function bp_activity_do_mentions() {

	/**
	 * Filters whether or not mentions are enabled.
	 *
	 * @since BuddyPress 1.8.0
	 *
	 * @param bool $enabled True to enable mentions, false to disable.
	 */
	return (bool) apply_filters( 'bp_activity_do_mentions', true );
}

Changelog

Changelog
Version Description
BuddyPress 1.8.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.