bp_maybe_load_mentions_scripts_for_blog_content( bool $load_mentions, bool $mentions_enabled )

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


Description Description


Parameters Parameters

$load_mentions

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

$mentions_enabled

(Required) True if mentions are enabled.


Top ↑

Return Return

(bool) True if mentions scripts should be loaded.


Top ↑

Source Source

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

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

	if ( $load_mentions || ( bp_is_blog_page() && is_singular() && comments_open() ) ) {
		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.