WP HOOKS
filtrod 4.4.0

customize_loaded_components

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

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

ParametrTypOpis
$componentsstring[]Array of core components to load.
$manager\WP_Customize_ManagerWP_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
}

Popularne w tej kategorii