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

}

? >

posted on 2012-12-03 13:19  kalintw  阅读(140)  评论(0)    收藏  举报

导航