admin管理员组文章数量:1130349
I think a good developer should provide the uninstallation in the safest and cleanest possible way.
I downloaded various plugins today to understand the process, but everything was very confusing. I found that many plugins are using both uninstall.php files and
register_uninstall_hook(__FILE__, 'pluginprefix_function_to_run');
Is it correct?
because the link that I have provided above says that these two are two different methods. so what is correct using either registration hook or uninstall.php or both?
I think a good developer should provide the uninstallation in the safest and cleanest possible way.
I downloaded various plugins today to understand the process, but everything was very confusing. I found that many plugins are using both uninstall.php files and
register_uninstall_hook(__FILE__, 'pluginprefix_function_to_run');
Is it correct?
because the link that I have provided above says that these two are two different methods. so what is correct using either registration hook or uninstall.php or both?
Share Improve this question edited Oct 25, 2018 at 10:24 kero 6,3501 gold badge25 silver badges34 bronze badges asked Oct 25, 2018 at 2:35 Richa SharmaRicha Sharma 497 bronze badges1 Answer
Reset to default 1They’re just two different ways of doing the same thing. It’s up to you which one to use, or whether to use both. Neither is ‘correct’. Use whichever makes more sense to you with the structure of your plugin.
I think a good developer should provide the uninstallation in the safest and cleanest possible way.
I downloaded various plugins today to understand the process, but everything was very confusing. I found that many plugins are using both uninstall.php files and
register_uninstall_hook(__FILE__, 'pluginprefix_function_to_run');
Is it correct?
because the link that I have provided above says that these two are two different methods. so what is correct using either registration hook or uninstall.php or both?
I think a good developer should provide the uninstallation in the safest and cleanest possible way.
I downloaded various plugins today to understand the process, but everything was very confusing. I found that many plugins are using both uninstall.php files and
register_uninstall_hook(__FILE__, 'pluginprefix_function_to_run');
Is it correct?
because the link that I have provided above says that these two are two different methods. so what is correct using either registration hook or uninstall.php or both?
Share Improve this question edited Oct 25, 2018 at 10:24 kero 6,3501 gold badge25 silver badges34 bronze badges asked Oct 25, 2018 at 2:35 Richa SharmaRicha Sharma 497 bronze badges1 Answer
Reset to default 1They’re just two different ways of doing the same thing. It’s up to you which one to use, or whether to use both. Neither is ‘correct’. Use whichever makes more sense to you with the structure of your plugin.
本文标签: UnInstallation of a Plugin from a developers perspectiveThe correct and clean method
版权声明:本文标题:UnInstallation of a Plugin from a developers perspective - The correct and clean method 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749233060a2336819.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论