Wordpress: why is the init hook invoked multiple times?

后端 未结 2 873
走了就别回头了
走了就别回头了 2020-12-10 15:35

I am at a real loss at this problem. I just created a plug-in, and to log the actions in the plug-in (as I can\'t see the output of the processing), I added a hook to init l

2条回答
  •  一个人的身影
    2020-12-10 16:03

    Do you have any links in the site (images, scripts, stylesheets, etc) that are 404'ing? If so, the default 404 page will display a "You are looking for something that is not here" page in the default site theme, so you'll end up getting the init hook called once for the initial page request, plus once for each bad link.

    Doublecheck with Firebug and see if anything is being called incorrectly.

提交回复
热议问题