wp_enqueue_code_editor

SummerySummery

Enqueue assets needed by the code editor for the given settings.

Syntax

wp_enqueue_code_editor( array $args )

ParametersParameters

$args

(array) (Required) Args.

  • 'type'
    (string) The MIME type of the file to be edited.
  • 'file'
    (string) Filename to be edited. Extension is used to sniff the type. Can be supplied as alternative to $type param.
  • '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.

ReturnReturn

(array|false) Settings for the enqueued code editor, or false if the editor was not enqueued.

SourceSource

File: wp-includes/general-template.php


			

ChangelogChangelog

Changelog
Version Description
4.9.0 Introduced.

See alsoSee also

Scroll to Top