WP HOOKS
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

ParametrTypOpis
$valuemixedThe setting value.
$setting\WP_Customize_SettingWP_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
}

Popularne w tej kategorii