On Mon, Jan 30, 2012 at 4:32 AM, Ghodmode <[email protected]> wrote:
> 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?

No, and you still shouldn't use it outside an action. twentyeleven
only uses it inside functions that are in actions, as far as I can
find.

(With one exception, that being the comment-reply script, which is
generally used in the header.php file.)

-Otto
_______________________________________________
wp-docs mailing list
[email protected]
http://lists.automattic.com/mailman/listinfo/wp-docs

Reply via email to