[wp-hackers] wp_default_scripts unreliable?

Jason Penney jpenney at jczorkmid.net
Thu Jul 1 22:01:42 UTC 2010


On 7/1/10 5:12 PM, Sergey Biryukov wrote:
> 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.

On 7/1/10 5:12 PM, Michael D Adams wrote:
> Those plugins are probably misbehaving.

That was my take on it as well, but I don't think it's obvious that
calling wp_enqueue_script before 'init' is problematic (there's a
mention of it in the Codex, but I didn't see it there until I searched
the page for 'init').  It doesn't seem to be mentioned in many of the
examples out in the wild.


> That said, can you hook into the script_loader_src filter instead?

I probably *could*, but I specifically chose wp_default_scripts to
ensure my plugin had minimal unintended consequences.  I wanted to be
sure to step out of the way of anything doing wp_deregister_script/
wp_register_script to override any of the default scripts.


Thanks,
Jay




-- 
Jason C Penney (jpenney at jczorkmid.net)
http://jasonpenney.net/


More information about the wp-hackers mailing list