plugins - Nested Actions and Filters

It is possible and a good practice to combine filters and actions, it is necessary to take into account the order in whi

It is possible and a good practice to combine filters and actions, it is necessary to take into account the order in which they are executed, a graphic example

Here I show you the example of the code I want to make:

Action parent + Filter child

add_action( "init", "parent_action");
function parent_action()
{
    add_filter( "any", "child_filter");
    function child_filter() 
    {

    }
}

Action parent + Action child

add_action( "init", "parent_action");
function parent_action()
{
    add_action( "any", "child_action");
    function child_action() 
    {

    }
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745176858a4615231.html

相关推荐

  • plugins - Nested Actions and Filters

    It is possible and a good practice to combine filters and actions, it is necessary to take into account the order in whi

    12小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信