WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

_WP_Editors::default_settings() private WP 4.8.0

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

Это метод класса: _WP_Editors{}

Хуков нет.

Возвращает

Массив.

Использование

$result = _WP_Editors::default_settings();

Заметки

  • Global. Строка. $tinymce_version

Список изменений

С версии 4.8.0 Введена.

Код _WP_Editors::default_settings() WP 5.5.1

wp-includes/class-wp-editor.php
<?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;
}