Jarod Posted November 19, 2009 Share Posted November 19, 2009 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? Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 19, 2009 Share Posted November 19, 2009 What exactly do you mean by "Distributing its functions"? Do you mean where is the PHP code that the templates use and how is it put there? Quote Link to comment Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 Yes, I just want to know how it's put there though Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 20, 2009 Share Posted November 20, 2009 Basically, everything runs through the index.php file, which loads all the functions into the memory by including various files from the wp-includes folder From there it does all that it needs to in terms of filters, actions etc, then gets the template files, and eval()'s the code to output any of the function data within it  This is a very typical MVC structure - see wikipedia if you need more info on MVC Quote Link to comment Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 What does the eval() do? Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 20, 2009 Share Posted November 20, 2009 It executes the file as if it was a php file, so the code inside it gets run there and then see http://php.net/eval for more info Quote Link to comment Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 So I could make a txt file and then eval it? Seriously? Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted November 20, 2009 Share Posted November 20, 2009 Pretty much yeah Quote Link to comment Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 Cool Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.