wp-includes/general-template.php:4128Generates and returns code editor settings.
$argsarray$typestring
$filestring
$themeWP_Theme
$pluginstring
$codemirrorarray
$csslintarray
$jshintarray
$htmlhintarray
array|falseOne hook fires while wp_get_code_editor_settings() runs, in this order:
Filters settings that are passed into the code editor.
function wp_get_code_editor_settings( $args ) { $settings = array( 'codemirror' => array( 'indentUnit' => 4, 'indentWithTabs' => true, 'inputStyle' => 'contenteditable', 'lineNumbers' => true, 'lineWrapping' => true, 'styleActiveLine' => true, 'continueComments' => true, 'extraKeys' => array( 'Ctrl-Space' => 'autocomplete', 'Ctrl-/' => 'toggleComment', 'Cmd-/' => 'toggleComment', 'Alt-F' => 'findPersistent', 'Ctrl-F' => 'findPersistent', 'Cmd-F' => 'findPersistent', ), 'direction' => 'ltr', // Code is shown in LTR even in RTL languages. 'gutters' => array(), ), 'csslint' => array( 'errors' => true, // Parsing errors. 'box-model' => true, 'display-property-grouping' => true, 'duplicate-properties' => true, 'known-properties' => true, 'outline-none' => true, ), 'jshint' => array( 'esversion' => 11, 'module' => str_ends_with( $args['file'] ?? '', '.mjs' ), // This script module URL is intentionally referenced here instead of registering an espree script module // in wp_default_script_modules(). This is a first stab at a core-only private module. 'espreeModuleUrl' => add_query_arg( 'ver', '9.6.1', includes_url( 'js/codemirror/espree.min.js' ) ), // The following JSHint *linting rule* options are copied from // <https://github.com/WordPress/wordpress-develop/blob/6.9.0/.jshintrc>. // Parsing-related options such as `esversion` (and, in other contexts, `es5`, `es3`, `module`, `strict`) // are honored by the Espree-based integration, but these linting-rule options are not interpreted by Espree // and are kept only for compatibility/documentation with the original JSHint configuration. 'boss' => true, 'curly' => true, 'eqeqeq' => true, 'eqnull' => true, 'expr' => true, 'immed' => true, 'noarg' => true, 'nonbsp' => true, 'quotmark' => 'single', 'undef' => true, 'unused' => true, 'browser' => true, 'globals' => array( '_' => false, 'Backbone' => false, 'jQuery' => false, 'JSON' => false, 'wp' => false, 'export' => false, 'module' => false, 'require' => false, 'WorkerGlobalScope' => false, 'self' => false, 'OffscreenCanvas' => false, 'Promise' => false, ), ), 'htmlhint' => array( 'tagname-lowercase' => true, 'attr-lowercase' => true, 'attr-value-double-quotes' => false, 'doctype-first' => false, 'tag-pair' => true, 'spec-char-escape' => true, 'id-unique' => true, 'src-not-empty' => true, 'attr-no-duplication' => true, 'alt-require' => true,Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/general-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.