0

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');
}

1 Answer 1

2

Yes, you can nest actions.

Yes, your example will cause an infinite loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.