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? Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/ 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? Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-960991 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 Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961588 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 Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961590 Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 What does the eval() do? Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961592 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 Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961594 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? Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961595 Share on other sites More sharing options...
JAY6390 Posted November 20, 2009 Share Posted November 20, 2009 Pretty much yeah Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961600 Share on other sites More sharing options...
Jarod Posted November 20, 2009 Author Share Posted November 20, 2009 Cool Link to comment https://forums.phpfreaks.com/topic/182147-solved-website-structure-for-distributing-functions-like-in-wordpress/#findComment-961606 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.