wp教程:03WordPress主题模版加载过程

加载过程:

index.php >包含 wp-blog-header.php >
1.先加载wp-config.php 初始化数据库和核心类
wp-load.php
初始化完成,开始加载模板
2.template-loader.php
– 1.通过URL判断当前是什么页面
– 2.判断对应模板是否存在,如果不存在则调用默认模板
– 3.第74行调用include($template);方法。成功加载模板

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *