TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-19-2009, 02:02 PM   #1 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 18
Thanks: 1
Jarod B is on a distinguished road
Default 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?
Jarod B is offline  
Reply With Quote
Old 11-19-2009, 08:39 PM   #2 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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. ;)
delayedinsanity is offline  
Reply With Quote
Old 11-20-2009, 01:54 AM   #3 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 18
Thanks: 1
Jarod B is on a distinguished road
Default

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 is offline  
Reply With Quote
Old 11-20-2009, 01:55 AM   #4 (permalink)
The Wanderer
 
Join Date: Aug 2009
Posts: 18
Thanks: 1
Jarod B is on a distinguished road
Default

Do you know where it is put though?
Jarod B is offline  
Reply With Quote
Old 11-20-2009, 02:25 AM   #5 (permalink)
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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).
delayedinsanity is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating XML from a Mysql DB with PHP's DOM functions (part one) sketchMedia XML, XSLT, XPath, XQuery 10 03-05-2013 07:41 AM
Databse structure Village Idiot TalkPHP Developer Team 3 01-16-2009 10:31 PM


All times are GMT. The time now is 11:26 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design