Make WordPress Core

Changeset 38519


Ignore:
Timestamp:
09/04/2016 04:08:11 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Script Loader: Correct default value for $src in wp_enqueue_script() and wp_enqueue_style().

Props Frank Klein for initial patch.
See #37770.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r38345 r38519  
    253253 * @param string           $handle    Name of the script. Should be unique.
    254254 * @param string           $src       Full URL of the script, or path of the script relative to the WordPress root directory.
     255 *                                    Default empty.
    255256 * @param array            $deps      Optional. An array of registered script handles this script depends on. Default empty array.
    256257 * @param string|bool|null $ver       Optional. String specifying script version number, if it has one, which is added to the URL
     
    261262 *                                    Default 'false'.
    262263 */
    263 function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false, $in_footer = false ) {
     264function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false ) {
    264265    $wp_scripts = wp_scripts();
    265266
  • trunk/src/wp-includes/functions.wp-styles.php

    r37985 r38519  
    152152 * @param string           $handle Name of the stylesheet. Should be unique.
    153153 * @param string           $src    Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
     154 *                                 Default empty.
    154155 * @param array            $deps   Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
    155156 * @param string|bool|null $ver    Optional. String specifying stylesheet version number, if it has one, which is added to the URL
     
    161162 *                                 '(orientation: portrait)' and '(max-width: 640px)'.
    162163 */
    163 function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
     164function wp_enqueue_style( $handle, $src = '', $deps = array(), $ver = false, $media = 'all' ) {
    164165    _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
    165166
Note: See TracChangeset for help on using the changeset viewer.