On this page
apply_filters( 'wp_code_editor_settings', array $settings, array $args )
Filters settings that are passed into the code editor.
Description
Returning a falsey value will disable the syntax-highlighting code editor.
Parameters
$settingsarray-
The array of settings passed to the code editor.
A falsey value disables the editor. $argsarray-
Args passed when calling
get_code_editor_settings().
typestringThe MIME type of the file to be edited.filestringFilename being edited.themeWP_ThemeTheme being edited when on the theme file editor.pluginstringPlugin being edited when on the plugin file editor.codemirrorarrayAdditional CodeMirror setting overrides.csslintarrayCSSLint rule overrides.jshintarrayJSHint rule overrides.htmlhintarrayHTMLHint rule overrides.
Source
File: wp-includes/general-template.php. View all references
return apply_filters( 'wp_code_editor_settings', $settings, $args );
Related
Used By
| Used By | Description |
|---|---|
| wp_get_code_editor_settings() wp-includes/general-template.php | Generates and returns code editor settings. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_code_editor_settings