customize_loaded_components

FILTER wp-includes\class-wp-customize-manager.php (ligne 359) github
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.

Paramètres

Entrée :
$this->components, $this
Sortie :
@param string[]             $components Array of core components to load.
@param WP_Customize_Manager $manager    WP_Customize_Manager instance.

Utilisation

// Modifier la valeur avec le filtre 'customize_loaded_components'
add_filter('customize_loaded_components', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($this->components) {
    // Modifier la valeur
    return $this->components;
}

Actualités

Chargement des actualités...