WP HOOKS
filtrdynamicznyod 3.4.0

customize_value_{$id_base}

Args 2Plik wp-includes/class-wp-customize-setting.php

Opis — z kodu źródłowego

Filters a Customize setting value not handled as a theme_mod or option.

The dynamic portion of the hook name, $id_base, refers to the base slug of the setting name, initialized from $this->id_data['base']. For settings handled as theme_mods or options, see those corresponding functions for available hooks.

Parametry

ParametrTypOpis
$default_valuemixedThe setting default value. Default empty.
$setting\WP_Customize_SettingThe setting instance.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_value_{$id_base}', 'twoja_funkcja', 10, 2 );

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

Popularne w tej kategorii