[wp-hackers] Degrading gracefully with deactivated plugins?

Mark Jaquith mark.wordpress at txfx.net
Mon Mar 28 21:50:48 GMT 2005

Matthew Mullenweg wrote:

> Owen Winkler wrote:
>> Can we please not add any of these strange functions and just provide 
>> better documentation for switching themes, upgrading, and applying 
>> plugins, and be sure that authors of themes and plugins adhere to 
>> developer guidelines regarding these issues?  
> Many plugin functions (time_since, etc) could be embedded directly in 
> theme files, which would eliminate any bundling issues. Perhaps we 
> could make this more formal by having a file (extra-functions.php) 
> that was loaded with plugins if it existed for a theme.
Perhaps they could all be placed in a subdirectory of the theme 
directory.  /themes/my-theme/plugins/  That's how I've been doing it 
(along with code in the theme to include every file in the plugins 
directory.  Another thing is that you have to be careful of function 
redeclaration, in the case that someone already has that plugin 
installed.  I usually just wrap the entire plugin file in a giant 
"is_function()" that checks the main function of the plugin (no need to 
check every single function... if one of the plugin's functions has 
already been declared, they all probably have).

More information about the wp-hackers mailing list