[theme-reviewers] pluggable functions

Bruce Wampler weavertheme at gmail.com
Tue Oct 30 14:53:44 UTC 2012


I'd like to add a note to this discussion. Using 'function_exists' has been
common practice for quite some time, and I always thought its main purpose
was for child themes. Making a filter work is really much more difficult.
Almost anyone with even a slight idea of how PHP works can copy the
original function to a child's functions.php, make a few wording, or even
simple logic changes, to the function, and make the child work how they
want. While this kind of rote programming may not be best practice, I'm
sure there are thousands of small child themes that use this practice.

I think there are too many existing child themes dependent on
'function_exists' to ever disallow that, at least for existing themes.

Bruce Wampler

And besides,


>>>> On Sat, Oct 27, 2012 at 2:46 PM, Philip M. Hofer (Frumph) <
>>>> philip at frumph.net> wrote:
>>>>
>>>>>   Most functions being pluggable, i.e. function_exists (if that’s
>>>>> what you’re referring to) is actually a good idea.
>>>>>
>>>>> This allows those functions to be re-written if necessary in the
>>>>> functions.php of the child theme.
>>>>>
>>>>> I would consider this best practice.
>>>>> e-reviewers<http://lists.wordpress.org/mailman/listinfo/theme-reviewers>
>>>>>
>>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20121030/9d2cb347/attachment.htm>


More information about the theme-reviewers mailing list