wp_code_editor_settings
过滤钩子
apply_filters( 'wp_code_editor_settings', $settings, $args )
- 参数
-
-
(array)
$settings
The array of settings passed to the code editor.
A falsey value disables the editor.- Required: 是
-
(array)
$args
{
Args passed when calling `get_code_editor_settings()`.@type string $type The MIME type of the file to be edited.
@type string $file Filename being edited.
@type WP_Theme $theme Theme being edited when on the theme file editor.
@type string $plugin Plugin being edited when on the plugin file editor.
@type array $codemirror Additional CodeMirror setting overrides.
@type array $csslint CSSLint rule overrides.
@type array $jshint JSHint rule overrides.
@type array $htmlhint HTMLHint rule overrides.
}- Required: 是
-
(array)
- 定义位置
-
-
wp-includes/general-template.php
, line 4282
-
wp-includes/general-template.php
- 引入
- 4.9.0
- 弃用
- –
过滤传入代码编辑器的设置。
返回一个错误的值将禁用语法高亮的代码编辑器。
return apply_filters( 'wp_code_editor_settings', $settings, $args );
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。