[wp-trac] [WordPress Trac] #25280: wp_localize_script unexpectedly converts numbers to strings

WordPress Trac noreply at wordpress.org
Wed Mar 20 14:48:29 UTC 2019


#25280: wp_localize_script unexpectedly converts numbers to strings
-------------------------------------------------+-------------------------
 Reporter:  adamsilverstein                      |       Owner:
                                                 |  adamsilverstein
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.2
Component:  Script Loader                        |     Version:  3.2
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback has-unit-     |     Focuses:  javascript
  tests                                          |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 @desrosj This patch is ready to go...

 I think the main thing we need here is a decision: do we want to add this
 new helper `wp_pass_data_to_script` or should we instead encourage
 developers to use a different approach (eg. `add_inline_script`) to pass
 their data?

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


More information about the wp-trac mailing list