From ebd7fe8a2f4fae55e9163b40ff19afe0cf8b7cb7 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 25 May 2015 16:24:25 +0000 Subject: [PATCH] Cleanup the use of `$wp_scripts` global in `functions.wp-scripts.php`. See #32444. Built from https://develop.svn.wordpress.org/trunk@32596 git-svn-id: http://core.svn.wordpress.org/trunk@32566 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.wp-scripts.php | 13 +++---------- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/wp-includes/functions.wp-scripts.php b/wp-includes/functions.wp-scripts.php index f5328b09a3..615b502733 100644 --- a/wp-includes/functions.wp-scripts.php +++ b/wp-includes/functions.wp-scripts.php @@ -82,7 +82,7 @@ function wp_print_scripts( $handles = false ) { } } - return wp_scripts()->do_items( $handles ); + return $wp_scripts->do_items( $handles ); } /** @@ -91,7 +91,6 @@ function wp_print_scripts( $handles = false ) { * Registers a script to be linked later using the wp_enqueue_script() function. * * @see WP_Dependencies::add(), WP_Dependencies::add_data() - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * * @since 2.6.0 * @since 4.3.0 A return value was added. @@ -155,7 +154,7 @@ function wp_localize_script( $handle, $object_name, $l10n ) { return false; } - return wp_scripts()->localize( $handle, $object_name, $l10n ); + return $wp_scripts->localize( $handle, $object_name, $l10n ); } /** @@ -165,7 +164,6 @@ function wp_localize_script( $handle, $object_name, $l10n ) { * such as jQuery core, from being unregistered. * * @see WP_Dependencies::remove() - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * * @since 2.6.0 * @@ -208,7 +206,6 @@ function wp_deregister_script( $handle ) { * Registers the script if $src provided (does NOT overwrite), and enqueues it. * * @see WP_Dependencies::add(), WP_Dependencies::add_data(), WP_Dependencies::enqueue() - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * * @since 2.6.0 * @@ -246,7 +243,6 @@ function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false * Remove a previously enqueued script. * * @see WP_Dependencies::dequeue() - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. * * @since 3.1.0 * @@ -261,8 +257,6 @@ function wp_dequeue_script( $handle ) { /** * Check whether a script has been added to the queue. * - * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts. - * * @since 2.8.0 * @since 3.5.0 'enqueued' added as an alias of the 'queue' list. * @@ -295,6 +289,5 @@ function wp_script_is( $handle, $list = 'enqueued' ) { * @return bool True on success, false on failure. */ function wp_script_add_data( $handle, $key, $value ){ - global $wp_scripts; - return $wp_scripts->add_data( $handle, $key, $value ); + return wp_scripts()->add_data( $handle, $key, $value ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 9558d4ce6d..5c56636926 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32595'; +$wp_version = '4.3-alpha-32596'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.