Changes between Version 2 and Version 3 of Ticket #25280, comment 1
- Timestamp:
- 09/11/2013 05:07:25 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25280, comment 1
v2 v3 1 1 It also converts booleans to strings as well and if you don't have control of the javascript reading the vars you can't use numbers or booleans. 2 3 `json_encode` is not why numbers are converted to strings. They are cast as a string on purpose: 4 `$l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8');` 2 5 3 6 I know the general accepted practice is to use wp_localize_script to pass variables to javascript but that is not what the function was intended for (it's a bonus feature and I blame Otto's awesome blog post). It's for string translations and I don't think it should be changed because numbers don't need to be translated. 4 7 5 Over 58% of our user base is still on 5.2.x http://wordpress.org/about/stats/ but doesn't mean we can't use some 5.3 features.6 7 8 I'm thinking wontfix.