#19959 closed defect (bug) (fixed)
Fix localization issues when a plugin calls wp_enqueue_script() too early
Reported by: | nacin | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | |
Focuses: | Cc: |
Description
Follow-up to #11526. After digging through this some more, the attached change to WP_Scripts should be just fine for all locales.
Attachments (1)
Change History (8)
#2
@
13 years ago
Seems to work in my test with ticket:14024:doing-it-wrong.php.
#3
@
13 years ago
Thinking it would make sense to run that action early on "init":
add_action( 'init', array( $this, 'init' ), 1 );
#5
@
13 years ago
Works fine with the test, but fails when nothing is attached too early. This is because we're already at the init hook by the time we try to attach something to init.
Note: See
TracTickets for help on using
tickets.
This doesn't work, but I bet there is a solution at hand.