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

Chip Bennett chip at chipbennett.net
Sun Jul 3 01:08:48 UTC 2011


Somehow, we seem to be on completely different pages, and I am unsure why.

Let's start with Plugins adding content to the HTML document head. As far as
I understand, a Plugin has two primary options for injecting such content:

1) Using *wp_enqueue_style()* or *wp_enqueue_script()*

2) Using *add_action( 'wp_head', 'some_custom_function' )*, where *
some_custom_function()* prints a fully formed script or style tag, or
whatever other content.


If these are the only two options, then I stand by my assertion that adding
an ob_cache layer on top of the core Hooks API is unnecessary, because *both
of these options already have means within core functionality to be undone*:

1) Anything hooked in using *wp_enqueue_style()* or
*wp_enqueue_script()*can be undone by calling
*wp_dequeue_style()* and *wp_dequeue_script()*, respectively.

2) Anything hooked in using *add_action( 'wp_head', 'some_custom_function' )
* can be undone by calling *remove_action( 'wp_head', 'some_custom_function'
)*


Am I missing any options? Are there any other ways for Plugins to inject
content into the HTML document head?

On Sat, Jul 2, 2011 at 7:30 PM, Darren Slatten <darrenslatten at gmail.com>wrote:
>
>
> 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?


Again here speaking based solely my opinion only: I agree with Otto. Themes
and Plugins hosted by WordPress.org absolutely should not be promoting,
encouraging, or facilitating users to be using outdated, insecure versions
of WordPress.

Just FYI: the decision point regarding dropping WordPress official support
for PHP4 was *10%*. It appears the IE6 support has been handled in much the
same way. So, officially not supporting the 9.4% of WordPress users who are
using 2.7 and older versions of WordPress is, IMHO, entirely reasonable.

How such repository-hosted Plugins get handled, I leave to others. But I
would agree with a decision to suspend them.

Chip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110702/b8a08e4a/attachment.htm>


More information about the theme-reviewers mailing list