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