[wp-docs] wp_enqueue_script ... "can lead to problems"

Ghodmode ghodmode at ghodmode.com
Mon Jan 30 10:32:36 UTC 2012


This statement is under the Usage on the
http://codex.wordpress.org/Function_Reference/wp_enqueue_script page:

'''Use the <tt>wp_enqueue_scripts</tt> action to call this function,
or <tt>admin_enqueue_scripts</tt> to call it on the admin side.'''
Calling it outside of an action can lead to problems. See
[http://core.trac.wordpress.org/ticket/11526 #11526] for details.

The ticket has already been fixed and there isn't any other supporting
reason not to use wp_enqueue_script.  Also, the function is called
directly in current themes, including twentyeleven.

This statement should be removed, shouldn't it?

--
Vince Aggrippino
a.k.a. Ghodmode
http://codex.wordpress.org/User:Ghodmode


More information about the wp-docs mailing list