The function hook_css_alter() lets you replace, add, or substractCSS files from the page prior to the files beding output. Viewsgoes through a relativaely long process from starting a view tofinally presenting
rendered output to the user. First, the view hasto be loaded and argument input given. Then, handlers and pluginshave to be instantiated, pager data loaded into the view, and theexposed forms executed to get the input. After that, the buildprocess will go
through all of the handlers, which can add theirown data to the query. The query is executed, and finally the styleand handlers render the view.
Deep study on K2 theme;
1. Entrypoint page index.php;
From the index.php, we can clearly see that it breaks the page intothree parts: header part; content part and footer part.
As for the header part, it use get_header() function to get thecontents.In the main content, it also contains two parts: primaryparts and sidebar part.There are three elements : notices, dynamiccontent and main content in the primary area. For the sidebar area,it also use the get_sidebar() function to fetch the relatedcontent.
Following the standard, get_footer() method is used to render thefooter's content.
2.Let me tell the stroy about get_header()
get_header() method can accept one paramter $name which providesone way to customize the default header page.When you pass the$name to get_header() method, it will use header-$name.php templateinstead of header.php.
There is another thing which need to be emphasized. It invokes theget_header action.By search, we can know clearly the methods whichbind to this action.
Deep study on K2 theme;
1. Entrypoint page index.php;
From the index.php, we can clearly see that it breaks the page intothree parts: header part; content part and footer part.
As for the header part, it use get_header() function to get thecontents.In the main content, it also contains two parts: primaryparts and sidebar part.There are three elements : notices, dynamiccontent and main content in the primary area. For the sidebar area,it also use the get_sidebar() function to fetch the relatedcontent.
Following the standard, get_footer() method is used to render thefooter's content.
2.Let me tell the stroy about get_header()
get_header() method can accept one paramter $name which providesone way to customize the default header page.When you pass the$name to get_header() method, it will use header-$name.php templateinstead of header.php.
There is another thing which need to be emphasized. It invokes theget_header action.By search, we can know clearly the methods whichbind to this action.
本文详细剖析了K2主题的工作原理,重点介绍了页面布局结构及其组成部分。从入口文件index.php开始,逐步分解页面加载过程,包括头部、主要内容及页脚部分的加载方式,并解释了get_header()等函数的作用。
1570

被折叠的 条评论
为什么被折叠?



