wp plugin -6
Deactivation:
Deactivation时会触发register_deactivation_hook()。
register_ deactivation_hook( $file, $function )
$file - (string) (required) — Path to the primary plugin fi le
$function - (string) (required) — The function to be executed when the plugin is activated
例如:
< ?php
register_deactivation_hook( __FILE__, ‘boj_myplugin_uninstall’ );
function boj_myplugin_uninstall() {
//do something
}
? >
浙公网安备 33010602011771号