WP HOOKS
filtrod 4.9.0

wp_code_editor_settings

Args 2Plik wp-includes/general-template.phpDokumentacja WP ↗

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

ParametrTypOpis
$settingsarrayThe array of settings passed to the code editor. A falsey value disables the editor.
$argsarray{ 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
}

Popularne w tej kategorii