filtrod 4.9.0
wp_code_editor_settings
Opis — z kodu źródłowego
Filters settings that are passed into the code editor.
Returning a falsey value will disable the syntax-highlighting code editor.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$settings | array | The array of settings passed to the code editor. A falsey value disables the editor. |
$args | array | { Args passed when calling <code>get_code_editor_settings()</code>. @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. } |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_code_editor_settings', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_code_editor_settings', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii