filtrod 4.4.0
customize_loaded_components
Opis — z kodu źródłowego
Filters the core Customizer components to load.
This allows Core components to be excluded from being instantiated by filtering them out of the array. Note that this filter generally runs during the {@see 'plugins_loaded'} action, so it cannot be added in a theme.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$components | string[] | Array of core components to load. |
$manager | \WP_Customize_Manager | WP_Customize_Manager instance. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_loaded_components', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_loaded_components', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii