bp_groups_maybe_load_mentions_scripts( bool $load_mentions, bool $mentions_enabled )

Should BuddyPress load the mentions scripts and related assets, including results to prime the mentions suggestions?


Parameters Parameters

$load_mentions

(bool) (Required) True to load mentions assets, false otherwise.

$mentions_enabled

(bool) (Required) True if mentions are enabled.


Top ↑

Return Return

(bool) True if mentions scripts should be loaded.


Source Source

File: bp-groups/bp-groups-filters.php

function bp_groups_maybe_load_mentions_scripts( $load_mentions, $mentions_enabled ) {
	if ( ! $mentions_enabled ) {
		return $load_mentions;
	}

	if ( $load_mentions || bp_is_group_activity() ) {
		return true;
	}

	return $load_mentions;
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.