Nested “do” and “add” Actions is possible?
質問
I'm wondering
Questions were asked about more than one "add_action
" and filter nested before and it was deemed possible.
Are nested cross actions added?
Eg.
add_action('init', function(){
do_action('initialized');
});
function initialized(){
// ...
}
Second question
Will a vicious circle occur like the following?
function initialized(){
do_action('init');
}
解決
Yes, you can nest actions.
Yes, your example will cause an infinite loop.
所属していません wordpress.stackexchange