WP HOOKS
filtrod 4.2.0

customize_dynamic_setting_args

Args 2Plik wp-includes/class-wp-customize-manager.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters a dynamic setting's constructor args.

For a dynamic setting to be registered, this filter must be employed to override the default false value with an array of args to pass to the WP_Customize_Setting constructor.

Parametry

ParametrTypOpis
$setting_argsfalse | arrayThe arguments to the WP_Customize_Setting constructor.
$setting_idstringID for dynamic setting, usually coming from <code>$_POST['customized']</code>.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_dynamic_setting_args', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii