[wp-hackers] wp_default_scripts unreliable?

Sergey Biryukov sergeybiryukov.ru at gmail.com
Thu Jul 1 21:12:00 UTC 2010

On Fri, Jul 2, 2010 at 1:00 AM, Jason Penney <jpenney at jczorkmid.net> wrote:
> My "Use Google Libraries" plugin uses the wp_default_scripts hook.  Most
> of the time, this works fine.  Sometimes it seems like my plugin isn't
> even installed.  wp_default_scripts fires in the constructor for
> WP_Scripts.  This means that any plugin that calls the
> wp_register_script or wp_enqueue_script in its main body of code
> (outside of any hooks) will cause wp_default_scripts to fire, which may
> be before my plugin code has been loaded.

This ticket seems to be related: http://core.trac.wordpress.org/ticket/11526
It was agreed that plugin developers should properly use the enqueue functions.

More information about the wp-hackers mailing list