filtrdynamicznyod 3.4.0
customize_sanitize_js_{$this->id}
Args 2Plik wp-includes/class-wp-customize-setting.php
Opis — z kodu źródłowego
Filters a Customize setting value for use in JavaScript.
The dynamic portion of the hook name, $this->id, refers to the setting ID.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$value | mixed | The setting value. |
$setting | \WP_Customize_Setting | WP_Customize_Setting instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_sanitize_js_{$this->id}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_sanitize_js_{$this->id}', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii