WP HOOKS
filtrod 4.5.0

customize_dynamic_partial_args

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

Opis — z kodu źródłowego

Filters a dynamic partial's constructor arguments.

For a dynamic partial 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_Partial constructor.

Parametry

ParametrTypOpis
$partial_argsfalse | arrayThe arguments to the WP_Customize_Partial constructor.
$partial_idstringID for dynamic partial.

Wywołanie

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

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

Popularne w tej kategorii