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
This commit is contained in:
parent
89a6ace623
commit
ebd7fe8a2f
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue