bp_add_mentions_on_tinymce_init( array $settings, string $editor_id )
Bind the mentions listener to a wp_editor instance when TinyMCE initializes.
Description Description
Parameters Parameters
- $settings
-
(Required) An array with TinyMCE config.
- $editor_id
-
(Required) Unique editor identifier, e.g. 'content'.
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; }
Changelog Changelog
Version | Description |
---|---|
2.3.3 | Introduced. |