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.

许可以下: CC-BY-SA归因
scroll top