[wp-trac] [WordPress Trac] #24724: _wpMediaViewsL10n not correctly enqueued in wp_enqueue_media()

WordPress Trac noreply at wordpress.org
Thu Jul 11 07:01:48 UTC 2013


#24724: _wpMediaViewsL10n not correctly enqueued in wp_enqueue_media()
--------------------------+------------------------------
 Reporter:  Fab1en        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  3.5.2
 Severity:  trivial       |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by Fab1en):

 In my use case, `wp_enqueue_media()` is used before `wp_head`.

 The behavior is the opposite of what you are saying nacin : check the
 documentation
 http://codex.wordpress.org/Function_Reference/wp_localize_script.

 == Function Reference/wp localize script ==
 === Description ===
    Localizes a script, but only if script has **already** been added. Can
 also be used to include arbitrary Javascript data in a page.

 wp_localize_script() must came after the enqueue, or else there is a
 potential problem.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24724#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list