Changeset 31188 for trunk/src/wp-includes/functions.wp-scripts.php
- Timestamp:
- 01/16/2015 01:05:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.wp-scripts.php
r31030 r31188 36 36 37 37 global $wp_scripts; 38 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {38 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 39 39 if ( ! did_action( 'init' ) ) 40 40 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 73 73 function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { 74 74 global $wp_scripts; 75 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {75 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 76 76 if ( ! did_action( 'init' ) ) 77 77 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 116 116 function wp_localize_script( $handle, $object_name, $l10n ) { 117 117 global $wp_scripts; 118 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {118 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 119 119 if ( ! did_action( 'init' ) ) 120 120 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 142 142 function wp_deregister_script( $handle ) { 143 143 global $wp_scripts; 144 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {144 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 145 145 if ( ! did_action( 'init' ) ) 146 146 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 198 198 function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) { 199 199 global $wp_scripts; 200 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {200 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 201 201 if ( ! did_action( 'init' ) ) 202 202 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 230 230 function wp_dequeue_script( $handle ) { 231 231 global $wp_scripts; 232 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {232 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 233 233 if ( ! did_action( 'init' ) ) 234 234 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ), … … 255 255 function wp_script_is( $handle, $list = 'enqueued' ) { 256 256 global $wp_scripts; 257 if ( ! is_a( $wp_scripts, 'WP_Scripts') ) {257 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 258 258 if ( ! did_action( 'init' ) ) 259 259 _doing_it_wrong( __FUNCTION__, sprintf( __( 'Scripts and styles should not be registered or enqueued until the %1$s, %2$s, or %3$s hooks.' ),
Note: See TracChangeset
for help on using the changeset viewer.