WordPress at Your Fingertips
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.


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

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

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)
    HTMLHint rule overrides.


Since 4.9.0 Introduced.

Where the hook is called

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

Where in WP core the hook is used WordPress

Usage not found.