wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_register_tinymce_scripts › WordPress Function
Since5.0.0
Deprecatedn/a
› wp_register_tinymce_scripts ( $scripts, $deprecated = false )
| Parameters: (2) |
|
| Defined at: |
|
| Codex: | |
| Change Log: |
|
Registers TinyMCE scripts.
TinyMCE core and the compat3x plugin are registered as separate files. TinyMCE loads its theme and any other plugins itself when an editor is initialized. Thewp-tinymce.js bundle of all of
them is no longer registered, but it can still be registered in their place under the
wp-tinymce handle.Source
function wp_register_tinymce_scripts( $scripts, $deprecated = false ): void {
global $tinymce_version;
if ( false !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '7.2.0' );
}
$suffix = wp_scripts_get_suffix();
$dev_suffix = wp_scripts_get_suffix( 'dev' );
/*
* This no longer depends on the concatenation settings, but it is where an admin screen has
* settled them until now, which the 'wp_should_concatenate_admin_scripts' filter documents.
*/
script_concat_settings();
// Load tinymce.js when running from /src, otherwise tinymce.min.js.
$scripts->add( 'wp-tinymce-root', includes_url( 'js/tinymce/' ) . "tinymce$dev_suffix.js", array(), $tinymce_version );
$scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . "plugins/compat3x/plugin$dev_suffix.js", array( 'wp-tinymce-root' ), $tinymce_version );
$scripts->add( 'wp-tinymce-lists', includes_url( "js/tinymce/plugins/lists/plugin$suffix.js" ), array( 'wp-tinymce' ), $tinymce_version );
}