Changeset 31196
- Timestamp:
- 01/16/2015 02:41:07 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.wp-scripts.php
r31193 r31196 30 30 * 31 31 * @since 4.2.0 32 * @access private 32 33 * 33 34 * @param string $function 34 35 */ 35 function wp_scripts_maybe_doing_it_wrong( $function ) {36 function _wp_scripts_maybe_doing_it_wrong( $function ) { 36 37 if ( did_action( 'init' ) ) { 37 38 return; … … 73 74 } 74 75 75 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );76 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 76 77 77 78 global $wp_scripts; … … 108 109 function wp_register_script( $handle, $src, $deps = array(), $ver = false, $in_footer = false ) { 109 110 $wp_scripts = wp_scripts(); 110 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );111 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 111 112 112 113 $wp_scripts->add( $handle, $src, $deps, $ver ); … … 148 149 global $wp_scripts; 149 150 if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 150 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );151 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 151 152 return false; 152 153 } … … 169 170 */ 170 171 function wp_deregister_script( $handle ) { 171 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );172 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 172 173 173 174 /** … … 221 222 $wp_scripts = wp_scripts(); 222 223 223 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );224 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 224 225 225 226 $_handle = explode( '?', $handle ); … … 247 248 */ 248 249 function wp_dequeue_script( $handle ) { 249 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );250 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 250 251 251 252 wp_scripts()->dequeue( $handle ); … … 266 267 */ 267 268 function wp_script_is( $handle, $list = 'enqueued' ) { 268 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );269 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 269 270 270 271 return (bool) wp_scripts()->query( $handle, $list ); -
trunk/src/wp-includes/functions.wp-styles.php
r31194 r31196 53 53 } 54 54 55 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );55 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 56 56 57 57 global $wp_styles; … … 82 82 */ 83 83 function wp_add_inline_style( $handle, $data ) { 84 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );84 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 85 85 86 86 if ( false !== stripos( $data, '</style>' ) ) { … … 110 110 */ 111 111 function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) { 112 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );112 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 113 113 114 114 wp_styles()->add( $handle, $src, $deps, $ver, $media ); … … 125 125 */ 126 126 function wp_deregister_style( $handle ) { 127 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );127 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 128 128 129 129 wp_styles()->remove( $handle ); … … 152 152 function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) { 153 153 global $wp_styles; 154 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );154 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 155 155 156 156 $wp_styles = wp_styles(); … … 173 173 */ 174 174 function wp_dequeue_style( $handle ) { 175 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );175 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 176 176 177 177 wp_styles()->dequeue( $handle ); … … 191 191 */ 192 192 function wp_style_is( $handle, $list = 'enqueued' ) { 193 wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );193 _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); 194 194 195 195 return (bool) wp_styles()->query( $handle, $list );
Note: See TracChangeset
for help on using the changeset viewer.