W3cubDocs

/WordPress

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

$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.

Source

File: wp-includes/general-template.php

View on Trac

Changelog

Version Description
4.9.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_code_editor_settings