Timeline for Can wp_localize_script be used within a shortcode?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 22, 2017 at 6:59 | vote | accept | frumious | ||
Aug 21, 2017 at 23:22 | answer | added | Milo | timeline score: 4 | |
Aug 21, 2017 at 7:51 | comment | added | frumious | @Milo Well, I feel like an idiot now, because that worked perfectly! I was sure I'd tried it before with no success, but clearly not. Thanks, if you turn that into an Answer I'll accept it. | |
Aug 21, 2017 at 2:51 | comment | added | Milo |
Have you tried setting $in_footer parameter to true when enqueueing the script? Scripts are output in wp_head by default, you can't localize a script after it's already been output to the page.
|
|
Aug 21, 2017 at 2:34 | review | First posts | |||
Aug 21, 2017 at 8:04 | |||||
Aug 21, 2017 at 2:33 | history | asked | frumious | CC BY-SA 3.0 |