TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Website structure for distributing functions like in wordpress (http://www.talkphp.com/general/5119-website-structure-distributing-functions-like-wordpress.html)

Jarod B 11-19-2009 02:02 PM

Website structure for distributing functions like in wordpress
 
Does anyone know how Wordpress distributes it's functions? I am wanting to distribute functions the same way for future use, right now I'm thinking that they transact through a middle page, I'm not exactly sure if they're imported right above the <html> tag though. But maybe I'm just completely wrong, any idea?

delayedinsanity 11-19-2009 08:39 PM

Could you elaborate on "distributes it's functions"?

Wordpress loads through a central index.php file that steps through a series of files which handle everything from installation to defining configuration settings. A boiled down walk through the process would look something like this; Page Accessed >> Load Config >> Include Includes >> i18n >> Plugins >> Controller >> View with of course a million minor intricacies going on at each of those stages. I realize this answer is a little vague, but the question is as well. ;)

Jarod B 11-20-2009 01:54 AM

I was having a hard time thinking lol, but yeah I wanted to know how the functions are done instead of using the include all the time. But I figured it out I think.

Jarod B 11-20-2009 01:55 AM

Do you know where it is put though?

delayedinsanity 11-20-2009 02:25 AM

All the functionality is contained in regular files, and included in the regular fashion. wp-includes/ and wp-admin/ hold the majority of the included files, and it's made up of both procedural format and classes. There's talk of moving everything to PHP 5 OOP within the next few versions which will result in a lot more of the functionality becoming classes, however most of the objects will still be wrapped with procedural 'shortcut' calls.

If you want to learn the process by which it loads the core, start in wp-blog-header.php and follow the path of includes (and requires).


All times are GMT. The time now is 10:18 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0