On this page
_WP_Editors::print_tinymce_scripts()
Print (output) the main TinyMCE scripts.
Source
File: wp-includes/class-wp-editor.php. View all references
public static function print_tinymce_scripts() {
global $concatenate_scripts;
if ( self::$tinymce_scripts_printed ) {
return;
}
self::$tinymce_scripts_printed = true;
if ( ! isset( $concatenate_scripts ) ) {
script_concat_settings();
}
wp_print_scripts( array( 'wp-tinymce' ) );
echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
}
Related
Uses
| Uses | Description |
|---|---|
| wp_print_scripts() wp-includes/functions.wp-scripts.php | Prints scripts in document head that are in the $handles queue. |
| script_concat_settings() wp-includes/script-loader.php | Determines the concatenation and compression settings for scripts and styles. |
| _WP_Editors::wp_mce_translation() wp-includes/class-wp-editor.php | Translates the default TinyMCE strings and returns them as JSON encoded object ready to be loaded with tinymce.addI18n(), or as JS snippet that should run after tinymce.js is loaded. |
Used By
| Used By | Description |
|---|---|
| _WP_Editors::print_default_editor_scripts() wp-includes/class-wp-editor.php | Print (output) all editor scripts and default settings. |
| _WP_Editors::editor_js() wp-includes/class-wp-editor.php | Print (output) the TinyMCE configuration and initialization scripts. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/_wp_editors/print_tinymce_scripts