Make WordPress Core

Ticket #31636: 31636.3.patch

File 31636.3.patch, 1.1 KB (added by ocean90, 11 years ago)
  • src/wp-includes/functions.wp-scripts.php

     
    209209 * @global WP_Scripts $wp_scripts The WP_Scripts object for printing scripts.
    210210 *
    211211 * @since 2.6.0
    212 
     212 *
    213213 * @param string      $handle    Name of the script.
    214214 * @param string|bool $src       Path to the script from the root directory of WordPress. Example: '/js/myscript.js'.
    215215 * @param array       $deps      An array of registered handles this script depends on. Default empty array.
     
    224224
    225225        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
    226226
    227         $_handle = explode( '?', $handle );
    228 
    229227        if ( $src ) {
     228                $_handle = explode('?', $handle);
    230229                $wp_scripts->add( $_handle[0], $src, $deps, $ver );
    231         }
    232230
    233         if ( $in_footer ) {
    234                 $wp_scripts->add_data( $_handle[0], 'group', 1 );
     231                if ( $in_footer ) {
     232                        $wp_scripts->add_data( $_handle[0], 'group', 1 );
     233                }
    235234        }
    236235
    237236        $wp_scripts->enqueue( $handle );