admin管理员组文章数量:1124644
I found a strange behaviour from the WP core related to remove_action,
add_action('my_custom_hook', 'mycustomfunc2',99);
add_action('my_custom_hook', 'mycustomfunc3',100);
function mycustomfunc1(){
echo 'mycustomfunc1 <br/>';
}
function mycustomfunc2() {
echo 'mycustomfunc2 <br/>';
remove_action('my_custom_hook', 'mycustomfunc2',99);
}
function mycustomfunc3() {
echo 'mycustomfunc3 <br/>';
}
add_action('wp', function(){
do_action('my_custom_hook');
exit;
});
here when we are removing mycustomfunc2 and the mycustomfunc3 automatically getting removed generating output like this- Appreciate if this being checked, initially it seems to be a clear bug. I can ensure I am using WP version 6.4.3 with no change in core files.
本文标签: filtersremovefunction method removing next priority action too while removing current priority
版权声明:本文标题:filters - remove_function method removing next priority action too while removing current priority 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736646060a1946106.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论