Fires after a plugin has been activated. If a plugin is silently activated (such as during an update), this hook does not fire.
$plugin, $network_wide
Sortie :
@param string $plugin Path to the plugin file relative to the plugins directory. @param bool $network_wide Whether to enable the plugin for all sites in the network
// Ajouter une fonction au hook action 'activated_plugin'
add_action('activated_plugin', 'ma_fonction_personnalisee', 10, 1);
function ma_fonction_personnalisee($plugin, $network_wide) {
// Votre code ici
error_log('Hook activated_plugin déclenché');
}
Chargement des actualités...