Ticket #25280: 25280.patch
File 25280.patch, 737 bytes (added by , 11 years ago) |
---|
-
wp-includes/class.wp-scripts.php
145 145 } 146 146 147 147 foreach ( (array) $l10n as $key => $value ) { 148 if ( !is_scalar($value) )148 if ( is_bool( $value ) || ! is_scalar( $value ) ) 149 149 continue; 150 150 151 151 $l10n[$key] = html_entity_decode( (string) $value, ENT_QUOTES, 'UTF-8'); 152 152 } 153 153 154 $script = "var $object_name = " . json_encode($l10n) . ';';154 $script = "var $object_name = " . defined( 'JSON_NUMERIC_CHECK' ) ? json_encode( $l10n, JSON_NUMERIC_CHECK ) : json_encode( $l10n ) . ';'; 155 155 156 156 if ( !empty($after) ) 157 157 $script .= "\n$after;";