diff --git a/src/wp-includes/functions.wp-scripts.php b/src/wp-includes/functions.wp-scripts.php
index ea719df..06aed27 100644
--- a/src/wp-includes/functions.wp-scripts.php
+++ b/src/wp-includes/functions.wp-scripts.php
@@ -108,7 +108,6 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_f
* @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.
* Example: '/[a-zA-Z0-9_]+/'.
* @param array $l10n The data itself. The data can be either a single or multi-dimensional array.
- * @return bool True if the script was successfully localized, false otherwise.
*/
function wp_localize_script( $handle, $object_name, $l10n ) {
global $wp_scripts;
@@ -116,11 +115,10 @@ function wp_localize_script( $handle, $object_name, $l10n ) {
if ( ! did_action( 'init' ) )
_doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
'wp_enqueue_scripts
', 'admin_enqueue_scripts
', 'login_enqueue_scripts
' ), '3.3' );
-
- return false;
+ $wp_scripts = new WP_Scripts();
}
- return $wp_scripts->localize( $handle, $object_name, $l10n );
+ $wp_scripts->localize( $handle, $object_name, $l10n );
}
/**