WordPress.org

Make WordPress Core

Changeset 32596


Ignore:
Timestamp:
05/25/2015 04:23:46 PM (6 years ago)
Author:
wonderboymusic
Message:

Cleanup the use of $wp_scripts global in functions.wp-scripts.php.

See #32444.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.wp-scripts.php

    r32483 r32596  
    8383    }
    8484
    85     return wp_scripts()->do_items( $handles );
     85    return $wp_scripts->do_items( $handles );
    8686}
    8787
     
    9292 *
    9393 * @see WP_Dependencies::add(), WP_Dependencies::add_data()
    94  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    9594 *
    9695 * @since 2.6.0
     
    156155    }
    157156
    158     return wp_scripts()->localize( $handle, $object_name, $l10n );
     157    return $wp_scripts->localize( $handle, $object_name, $l10n );
    159158}
    160159
     
    166165 *
    167166 * @see WP_Dependencies::remove()
    168  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    169167 *
    170168 * @since 2.6.0
     
    209207 *
    210208 * @see WP_Dependencies::add(), WP_Dependencies::add_data(), WP_Dependencies::enqueue()
    211  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    212209 *
    213210 * @since 2.6.0
     
    247244 *
    248245 * @see WP_Dependencies::dequeue()
    249  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    250246 *
    251247 * @since 3.1.0
     
    261257/**
    262258 * Check whether a script has been added to the queue.
    263  *
    264  * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    265259 *
    266260 * @since 2.8.0
     
    296290 */
    297291function wp_script_add_data( $handle, $key, $value ){
    298     global $wp_scripts;
    299     return $wp_scripts->add_data( $handle, $key, $value );
    300 }
     292    return wp_scripts()->add_data( $handle, $key, $value );
     293}
Note: See TracChangeset for help on using the changeset viewer.