WordPress at a glance
function is not described

_WP_Editors::default_settings() private WP 4.8.0

Returns the default TinyMCE settings. Doesn't include plugins, buttons, editor selector.

{} It's a method of the class: _WP_Editors{}

This is an internal function for using it by WP core itself. It's not recommended to use this function in your code.

No Hooks.

Return

Array. Null. Nothing.

Usage

$result = _WP_Editors::default_settings();

Notes

  • Global. String. $tinymce_version

Changelog

Since 4.8.0 Introduced.

Code of _WP_Editors::default_settings() WP 5.7.1

<?php
private static function default_settings() {
	global $tinymce_version;

	$shortcut_labels = array();

	foreach ( self::get_translation() as $name => $value ) {
		if ( is_array( $value ) ) {
			$shortcut_labels[ $name ] = $value[1];
		}
	}

	$settings = array(
		'theme'                        => 'modern',
		'skin'                         => 'lightgray',
		'language'                     => self::get_mce_locale(),
		'formats'                      => '{' .
			'alignleft: [' .
				'{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"left"}},' .
				'{selector: "img,table,dl.wp-caption", classes: "alignleft"}' .
			'],' .
			'aligncenter: [' .
				'{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"center"}},' .
				'{selector: "img,table,dl.wp-caption", classes: "aligncenter"}' .
			'],' .
			'alignright: [' .
				'{selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li", styles: {textAlign:"right"}},' .
				'{selector: "img,table,dl.wp-caption", classes: "alignright"}' .
			'],' .
			'strikethrough: {inline: "del"}' .
		'}',
		'relative_urls'                => false,
		'remove_script_host'           => false,
		'convert_urls'                 => false,
		'browser_spellcheck'           => true,
		'fix_list_elements'            => true,
		'entities'                     => '38,amp,60,lt,62,gt',
		'entity_encoding'              => 'raw',
		'keep_styles'                  => false,
		'cache_suffix'                 => 'wp-mce-' . $tinymce_version,
		'resize'                       => 'vertical',
		'menubar'                      => false,
		'branding'                     => false,

		// Limit the preview styles in the menu/toolbar.
		'preview_styles'               => 'font-family font-size font-weight font-style text-decoration text-transform',

		'end_container_on_empty_block' => true,
		'wpeditimage_html5_captions'   => true,
		'wp_lang_attr'                 => get_bloginfo( 'language' ),
		'wp_keep_scroll_position'      => false,
		'wp_shortcut_labels'           => wp_json_encode( $shortcut_labels ),
	);

	$suffix  = SCRIPT_DEBUG ? '' : '.min';
	$version = 'ver=' . get_bloginfo( 'version' );

	// Default stylesheets.
	$settings['content_css'] = includes_url( "css/dashicons$suffix.css?$version" ) . ',' .
		includes_url( "js/tinymce/skins/wordpress/wp-content.css?$version" );

	return $settings;
}