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');
}
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');
}
Share
Improve this question
asked Feb 22, 2021 at 6:40
km onurkm onur
1592 silver badges6 bronze badges
1 Answer
Reset to default 2Yes, you can nest actions.
Yes, your example will cause an infinite loop.