wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_register_tinymce_scripts › WordPress Function
Seit5.0.0
Veraltetn/v
› wp_register_tinymce_scripts ( $scripts, $deprecated = false )
| Parameter: (2) |
|
| Definiert in: |
|
| Codex: | |
| Changelog: |
|
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.Quellcode
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' );
// 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 );
}