WP HOOKS
akcjaod 2.9.0

activated_plugin

Args 2Plik wp-admin/includes/plugin.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Fires after a plugin has been activated.

If a plugin is silently activated (such as during an update), this hook does not fire.

Parametry

ParametrTypOpis
$pluginstringPath to the plugin file relative to the plugins directory.
$network_wideboolWhether to enable the plugin for all sites in the network or just the current site. Multisite only. Default false.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'activated_plugin', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii