WP HOOKS
akcjaod 2.9.0

deactivate_plugin

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

Opis — z kodu źródłowego

Fires before a plugin is deactivated.

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

Parametry

ParametrTypOpis
$pluginstringPath to the plugin file relative to the plugins directory.
$network_deactivatingboolWhether the plugin is deactivated 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( 'deactivate_plugin', 'twoja_funkcja', 10, 2 );

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

Popularne w tej kategorii