_WP_Editors::print_tinymce_scripts() WordPress Method

The WP_Editors::print_tinymce_scripts() method is used to print the required JavaScript for initializing the TinyMCE editor. This includes the necessary code for creating and initializing the editor instance, as well as for loading the appropriate language files.

_WP_Editors::print_tinymce_scripts() #

Print (output) the main TinyMCE scripts.


Source

File: wp-includes/class-wp-editor.php

	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";
	}


Top ↑

Changelog

Changelog
VersionDescription
4.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.