filtrod 4.5.0
customize_dynamic_partial_args
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
| Parametr | Typ | Opis |
|---|---|---|
$partial_args | false | array | The arguments to the WP_Customize_Partial constructor. |
$partial_id | string | ID 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
}
// 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