Filters settings that are passed into the code editor.
Description
Returning a falsey value will disable the syntax-highlighting code editor.
Parameters
$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
stringThe MIME type of the file to be edited.file
stringFilename being edited.theme
WP_ThemeTheme being edited when on the theme file editor.plugin
stringPlugin being edited when on the plugin file editor.codemirror
arrayAdditional CodeMirror setting overrides.csslint
arrayCSSLint rule overrides.jshint
arrayJSHint rule overrides.htmlhint
arrayHTMLHint rule overrides.
Source
return apply_filters( 'wp_code_editor_settings', $settings, $args );
Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.