这是一个相当深入的解释,
第1部分
http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-2315/
第2部分
http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-part-2-2437/
其中还包括一些图表/流程图。
![enter image description here](https://i.stack.imgur.com/MQJnR.png)
和
![enter image description here](https://i.stack.imgur.com/NiTDe.png)
这还只是了解WordPress初始化过程的开始,该过程还应包括有关模板层次结构的信息,以及检查在哪些页面上何时触发哪些挂钩。结合在一起,你可以对正在发生的事情和发生的地方有一个相当深刻的理解!
或此流程图
Rarst 如图所示
question![enter image description here](https://i.stack.imgur.com/7MhBq.png)
运行您自己的回溯
![enter image description here](https://i.stack.imgur.com/erXHZ.png)
如何
- http://www.php.net/manual/en/function.debug-backtrace.php
- http://queryposts.com/function/wp_debug_backtrace_summary/
。。。以最基本的形式。
更多
I can not vouch for the above four links specifically, however they are additional material which supports this question that you or others may find useful.
更多想看看在请求过程中触发了哪些操作?看看这个plugin 通过Toscho,
![enter image description here](https://i.stack.imgur.com/3mnxM.png)
想知道什么被钩住了,哪里有什么优先权?看看这个
plugin 通过
Rarst,
![enter image description here](https://i.stack.imgur.com/JREBh.png)
当想要知道内部和自定义挂钩在优先级链中的位置时,非常方便。
还有这个plugin 通过Kaiser,
<支持>Only one screenshot of several, rest can be found on GitHub Repo link
![enter image description here](https://i.stack.imgur.com/tYd2Q.png)
还有一个流程图,解释了查询过程以及什么时候使用,这将有助于补充这个问题,
Original source question 和answer here, 流程图Rarst.
<支持>This flowchart and Q&A I can vouch for.
![enter image description here](https://i.stack.imgur.com/Bzzg2.png)
(单击图像将直接转到该问答线程以获取更多信息)。
请注意,查看流程图是一件很有用的事情,它对于可视化初始化过程非常有用,上面与该主题的链接也很有帮助,但作为一名WordPress开发人员,一旦你陷入困境;开发“;,您希望使用其他调试工具来帮助您可视化和理解其中一些请求期间发生的情况。我相信上面提到的一切都是齐头并进的。
这些工具不是唯一可用的工具,也不是在初始化/请求过程中获取有价值数据的唯一方法,但它们是我使用的选择。请随意添加更多!
![](https://developer.wordpress.org/files/2014/10/template-hierarchy.png)
#changelog: 04/10/12 added flow chart from Rarst / "Make sense of WP core load"