Ticket #5177 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

WP_Scripts should localize first, load script second

Reported by: mdawaffe Owned by: anonymous
Priority: normal Milestone: 2.5
Component: General Version: 2.3
Severity: normal Keywords: has-patch commit
Cc:

Description

Currently, WP_Scripts::print_scripts() loads a javascript file, and the echoes out the localized strings.

It should first echo out the localized strings and then load the javascript file, so that the javascript file has immediate access to those strings.

Attached.

Attachments

5177.diff Download (543 bytes) - added by mdawaffe 4 years ago.

Change History

comment:1   ryan4 years ago

  • Status changed from new to closed
  • Resolution set to fixed

(In [6218]) Output localized strings before outputting js. Props mdawaffe. fixes #5177 for trunk

Note: See TracTickets for help on using tickets.