[theme-reviewers] Question about ob_start and ob_get_clean (Vicky Arulsingam)

Darren Slatten darrenslatten at gmail.com
Sun Jul 3 00:30:48 UTC 2011


>
> *I would argue that this is the desired result. Themes shouldn't be
> attempting to modify what plugins do.
> *


I agree--ideally, themes and plugins would function as separate
"abstraction layers"--but theme developers can't assume the ideal case;
they must assume the worst case. The reality we must face is that
WordPress plugins and themes share the same APIs, and most developers
write code without giving adequate consideration to its effects on the
global level. Simply put, it doesn't make sense to create theme
requirements based on the assumption that all plugins are coded "the
right way," when the fact is...many (most?) are not.



*The user can do that anyway, and in a much more sane way. If the plugin
> is hooked into wp_head, then it's using an action hook to do it.
> Modifying the output is simply a matter of removing the plugin's hook
> using remove_action and then adding its own hook using add_action.
> *


I already addressed this.



*Plugins should not include jQuery, as it's built into WordPress.
> Multiple plugins can wp_enqueue_script('jquery') all day long and only
> one jquery script gets put into the header.
>
> Correcting the plugin that is doing this incorrectly is the better
> alternative.
> *


I already addressed this.



*remove_action alone, without an alternate function add, would work for
> most of these cases.
> *


Most, but not all. What is your argument here...that we should prevent
themes from giving admins the ability to achieve GREAT because WordPress
core already provides GOOD?



*CSS and JS should be using the proper enqueue script/style methods,
> avoiding this anyway. Fixing the plugin is preferable.
> *


Again, wishful thinking isn't a valid reason for rejecting themes that
cater to real-world problems.



*If a plugin is using an older version of jquery or is maintaining
> back-compat all the way to 2.8, then please notify the author of the
> plugin that he's doing it wrong. I'd even be inclined to remove such
> plugins from the directory, as they're badly out of date.
> *


According to the WP stats <http://wordpress.org/about/stats/>, the number of
sites using WordPress versions
2.7 and older represents 9.4% of all WordPress users. You're saying that
any plugin that attempts to maintain backwards compatibility with those
(millions of) sites by hooking a jQuery reference directly to wp_head
(instead of using wp_enqueue_script) should be banned from the plugin
directory?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110702/bf71ea5d/attachment.htm>


More information about the theme-reviewers mailing list