diff options
Diffstat (limited to 'wp-includes/functions.wp-scripts.php')
-rw-r--r-- | wp-includes/functions.wp-scripts.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php index 1207502..de13496 100644 --- a/wp-includes/functions.wp-scripts.php +++ b/wp-includes/functions.wp-scripts.php @@ -211,7 +211,6 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $args * * @see WP_Scripts::localize() * @link https://core.trac.wordpress.org/ticket/11520 - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * * @since 2.2.0 * @@ -224,12 +223,7 @@ function wp_register_script( $handle, $src, $deps = array(), $ver = false, $args * @return bool True if the script was successfully localized, false otherwise. */ function wp_localize_script( $handle, $object_name, $l10n ) { - global $wp_scripts; - - if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { - _wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle ); - return false; - } + $wp_scripts = wp_scripts(); return $wp_scripts->localize( $handle, $object_name, $l10n ); } |