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

WordPress Trac noreply at wordpress.org
Sun May 25 23:28:46 UTC 2014


#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:                |     Focuses:
--------------------------+------------------------------

Comment (by ericlewis):

 Reproduced.

 The issue is that `wp_localize_script()` doesn't instantiate `$wp_scripts`
 if it doesn't
 exist^[https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
 includes/functions.wp-scripts.php#L120 1]^, bailing silently.

 On the admin side, `$wp_scripts` exists very early (before
 `admin_init`)^[https://core.trac.wordpress.org/browser/tags/3.9.1/src/wp-
 admin/admin.php#L90 2]^. But on the front-end, there's no
 guarantee`$wp_scripts` will ever be instantiated.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24724#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list