How`s the CMS working exactly (site implementation with template loader) ?
i checked the WP source code, but unfortunately i don`t understand the management system behind it so far.
I think every time the site gets an reload, the file “template-loader.php” checks whether a variable (attribute) is set in the class wpquery.
e.g. with the function is_home(). At the same time there`s a check whether the template for “Home” is available.
If this is the case, the template “Home.php” (synonym for the real name of the file) would be loaded.
Is this correct so far ?
What i don`get is, where will the attribute for “home” gets set in the “wpquery” class?
A method called set() is available in the class, and all attributes are false by default, so i think anywhere there must be a function-call wpquery->set(xy) when you click a link on the site. (xy stands for the “home attribute”, which gets set to true).
So the template-loader.php knows which template must be loaded.
Hope anyone understood this (i
m sorry my english isnt the best), or can explain me /give me an overview how the system works in its core.
- The topic ‘How`s the CMS working exactly (site implementation with template loader) ?’ is closed to new replies.