[theme-reviewers] pluggable functions

Shinra Web Holdings shinrawebholdings at gmail.com
Sat Oct 27 21:33:24 UTC 2012


Not specifically, but a namespace collision with a plugin could potentially
do some really weird things.
On Oct 27, 2012 3:01 PM, "Kirk Wight" <kwight at kwight.ca> wrote:

> Pluggable functions are pretty cool (particularly when you haven't got
> your head around hooks yet), because you can change anything very easily.
> The downside being, of course, you can change entire functions very easily.
>
> I believe Core in general has backed away from pluggable functions in
> favour of hooks (Core's only pluggable functions are now deprecated),
> making me feel like we should encourage the same.
>
> Does anyone know of any trouble that can come from having everything in
> functions.php pluggable, including functions on hooks?
>
> On 27 October 2012 15:51, Chip Bennett <chip at chipbennett.net> wrote:
>
>> And by contrast, making custom function return/output values filterable
>> is as good or better, depending on the circumstances. Depending on the
>> amount/complexity of that output/returned content, I would consider using
>> custom filters to be better practice than using pluggable functions.
>>
>> Of course, that's why it is good to make *reocmmendations* in Theme
>> reviews at this point, rather than making *requirements* or "not-approving"
>> Themes, based on pluggable-vs-filterable functions.
>>
>> Chip
>>
>>
>> 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.
>>>
>>>
>>>
>>>  *From:* Chip Bennett <chip at chipbennett.net>
>>> *Sent:* Saturday, October 27, 2012 12:22 PM
>>> *To:* theme-reviewers at lists.wordpress.org
>>> *Subject:* Re: [theme-reviewers] pluggable functions
>>>
>>> Absent pre-existing guidelines, I would list your findings as
>>> *recommended* only. It is always good to promote and to educate regarding
>>> best practices, but we should only ever *not-approve* (even if "required
>>> fix in next revision") those criteria that are stated in the guidelines.
>>>
>>> (That said: feel free to propose guidelines revisions wrt pluggable vs.
>>> filterable functions!)
>>>
>>> Thanks,
>>>
>>> Chip
>>>
>>> On Sat, Oct 27, 2012 at 2:17 PM, Kirk Wight <kwight at kwight.ca> wrote:
>>>
>>>> Howdy,
>>>>
>>>> I'm reviewing a theme that has made all functions in functions.php
>>>> pluggable, including those on hooks. From what I understand, this won't
>>>> break anything, but doesn't feel very "best practice"-y (anything on a hook
>>>> can just be removed from the hook, making the pluggable code un-necessary).
>>>>
>>>> The theme was already approved, but I prefer to encourage the best
>>>> practice; perhaps a "fix in next release" note is appropriate, rather than
>>>> blocking approval?..
>>>>
>>>> _______________________________________________
>>>> theme-reviewers mailing list
>>>> theme-reviewers at lists.wordpress.org
>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>
>>>>
>>>
>>> ------------------------------
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20121027/0cc997f7/attachment.htm>


More information about the theme-reviewers mailing list