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

The array of settings passed to the code editor.<br> A falsey value disables the editor.

$args

Args passed when calling get_code_editor_settings().<br>

  • 'type'
    (string) The MIME type of the file to be edited.<br>
  • 'file'
    (string) Filename being edited.<br>
  • 'theme'
    (WP_Theme) Theme being edited when on the theme file editor.<br>
  • 'plugin'
    (string) Plugin being edited when on the plugin file editor.<br>
  • 'codemirror'
    (array) Additional CodeMirror setting overrides.<br>
  • 'csslint'
    (array) CSSLint rule overrides.<br>
  • 'jshint'
    (array) JSHint rule overrides.<br>
  • 'htmlhint'
    (array) HTMLHint rule overrides.<br>


Source

File: wp-includes/general-template.php

View on GitHub



Changelog

Changelog
Version Description
4.9.0 Introduced.