wp_register_tinymce_scripts( WP_Scripts $scripts, $force_uncompressed = false )
Registers TinyMCE scripts.
Description Description
Parameters Parameters
- $scripts
-
(WP_Scripts) (Required) WP_Scripts object.
Source Source
File: wp-includes/script-loader.php
function wp_register_tinymce_scripts( &$scripts, $force_uncompressed = false ) { global $tinymce_version, $concatenate_scripts, $compress_scripts; $suffix = wp_scripts_get_suffix(); $dev_suffix = wp_scripts_get_suffix( 'dev' ); script_concat_settings(); $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed; // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or // tinymce.min.js (when SCRIPT_DEBUG is true). if ( $compressed ) { $scripts->add( 'wp-tinymce', includes_url( 'js/tinymce/' ) . 'wp-tinymce.js', array(), $tinymce_version ); } else { $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 ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |