bp_add_mentions_on_tinymce_init( array $settings, string $editor_id )

Bind the mentions listener to a wp_editor instance when TinyMCE initializes.


Parameters Parameters

$settings

(array) (Required) An array with TinyMCE config.

$editor_id

(string) (Required) Unique editor identifier, e.g. 'content'.


Top ↑

Return Return

(array) $mceInit An array with TinyMCE config.


Source Source

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

function bp_add_mentions_on_tinymce_init( $settings, $editor_id ) {
	// We only apply the mentions init to the visual post editor in the WP dashboard.
	if ( 'content' === $editor_id ) {
		$settings['init_instance_callback'] = 'window.bp.mentions.tinyMCEinit';
	}

	return $settings;
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.3.3 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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