[wp-hackers] a plugin of a theme's own

Owen Winkler ringmaster at midnightcircus.com
Mon Sep 19 19:46:04 GMT 2005

David House wrote:
> On 19/09/05, Trevor Turk <trevorturk at yahoo.com> wrote:
>>I'm wondering if any thought has been given to
>>potential conflicts between plugins and then plugins a
>>theme might provide in the optional functions.php
> Surely its just the same as conflicts between plugins? Just namespace
> all your functions, and everyone's happy;

I don't think it's necessarily that simple.

Suppose for example that a theme adds a content filter for acronyms.  If 
a plugin is installed with the same feature, and they are namespaced 
differently, then the Acronym filter could be applied twice.

That's a simple example of interference that could be more significant 
in a more significant plugin.  If the acronym functionality is just part 
of the full featureset of the plugin, then turning off the plugin might 
not be a practical response to its feature collision with a theme's 

Perhaps it would be wise to allow an administrator to disable a theme's 
functions.php file entirely from the Presentation tab of the WP admin?

Or, at the least, a theme that wants to provide additional functionality 
via the functions.php should provide a way to disable part or all of the 
functionality that it provides.

Note also that themes that are packed with functions from original 
plugins might have the need to be overridden by the dedicated plugins 
should security or bug-fix issues occur.  In that case, the theme author 
should have allowed for an administrator to supplant the functions.php 
functionality with that of the original plugin.



More information about the wp-hackers mailing list