我是WordPress的新手.我创造了我的插件。现在我正在创建uninstall.php文件来卸载我的插件.
这是我的uninstall.php代码
if(!defined('WP_UNINSTALL_PLUGIN'))
exit ();
//here I am dropping my table and options...我不知道怎么打电话给uninstall.php?从哪里打电话?从那里我可以卸载我的插件..。
我知道register_uninstall_hook(),但它何时触发?
提前感谢
发布于 2013-11-11 08:12:40
卸载钩子和uninstall.php文件是实现卸载功能的两种替代方式,它们相互独立。
当uninstall_plugin()被调用时,它会检查uninstall.php或钩子(按这个顺序)。
因此,如果您使用的文件方法,没有什么特殊的,您需要做的调用它。WordPress查找它的名称,并在卸载时本地运行。
https://wordpress.stackexchange.com/questions/122853
复制相似问题