WordPress at a glance
filter is not described

wp_code_editor_settings filter-hook . WP 4.9.0

Filters settings that are passed into the code editor.

Returning a falsey value will disable the syntax-highlighting code editor.

Usage

add_filter( 'wp_code_editor_settings', 'filter_function_name_871', 10, 2 );
function filter_function_name_871( $settings, $args ){
	// filter...

	return $settings;
}
$settings(array)
The array of settings passed to the code editor. A falsey value disables the editor.
$args(array)

Args passed when calling get_code_editor_settings().

  • type(string)
    The MIME type of the file to be edited.

  • file(string)
    Filename being edited.

  • theme(WP_Theme)
    Theme being edited when on theme editor.

  • plugin(string)
    Plugin being edited when on plugin editor.

  • codemirror(array)
    Additional CodeMirror setting overrides.

  • csslint(array)
    CSSLint rule overrides.

  • jshint(array)
    JSHint rule overrides.

  • htmlhint(array)
    JSHint rule overrides.

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

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

Где вызывается хук

wp_get_code_editor_settings()
wp_code_editor_settings
wp-includes/general-template.php 4007
return apply_filters( 'wp_code_editor_settings', $settings, $args );

Где используется хук в ядре WordPress

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