Function: wp_get_code_editor_settings

wp_get_code_editor_settings( array $args )

Generate and return code editor settings.

Shortcut: wgces

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.

Parameters

Name Type(s) Default Value Description
$args array

{ Args.

@type string   $type       The MIME type of the file to be edited.
@type string   $file       Filename to be edited. Extension is used to sniff the type. Can be supplied as alternative to `$type` param.
@type WP_Theme $theme      Theme being edited when on theme editor.
@type string   $plugin     Plugin being edited when on plugin editor.
@type array    $codemirror Additional CodeMirror setting overrides.
@type array    $csslint    CSSLint rule overrides.
@type array    $jshint     JSHint rule overrides.
@type array    $htmlhint   JSHint rule overrides.

}

Returns

array | false

Settings for the code editor.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.