[theme-reviewers] PHP namespace

Andrew Nacin wp at andrewnacin.com
Wed May 22 21:21:30 UTC 2013


On Wed, May 22, 2013 at 4:02 PM, Chip Bennett <chip at chipbennett.net> wrote:

> The issue of passing anonymous functions to hooks is certainly valid.
> Hooks must reference a valid callback, so that they can be overridden.
>
> Another major concern is that the Theme *requires* a PHP version higher
> than that required by WordPress core.
>

If a theme cannot safely activate on the minimum version of PHP required by
WordPress, then it has no place in the directory.

In core, I don't think we "sandbox" themes the way we do plugins. If this
triggers fatal errors in 5.2, that's a no-no. The only alternative would be
for it to switch back to the previous theme if it cannot run in 5.2. It
looks like this theme does do this:
http://themes.svn.wordpress.org/action/1.1.7/functions.php

The big problem with using PHP closures in a theme is that a child theme
(or a plugin) cannot remove_action() or that add_action( $hook, function()
{ ... } ) call. (Same goes for remove_filter() and add_filter().) Even when
core moves to PHP 5.3, we will not use closures in this way. They just
aren't compatible with our simplistic hook API.

I don't think that is a reason to reject this theme. But I'm not sure such
a developer-oriented theme has much of a place in the generic user-oriented
themes directory. I would be interested to see if ryanve (the developer)
ultimately agrees it should stay on GitHub.

Nacin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20130522/7ce398d9/attachment.html>


More information about the theme-reviewers mailing list