Make WordPress Core

Ticket #20683: 35841.patch

File 35841.patch, 3.5 KB (added by sebastian.pisula, 9 years ago)
  • wp-includes/functions.wp-scripts.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    214214 *
    215215 * @param string      $handle    Name of the script.
    216216 * @param string|bool $src       Path to the script from the root directory of WordPress. Example: '/js/myscript.js'.
    217  * @param array       $deps      An array of registered handles this script depends on. Default empty array.
     217 * @param array|string       $deps      An array of registered handles this script depends on. Default empty array.
    218218 * @param string|bool $ver       Optional. String specifying the script version number, if it has one. This parameter
    219219 *                               is used to ensure that the correct version is sent to the client regardless of caching,
    220220 *                               and so should be included if a version number is available and makes sense for the script.
  • wp-includes/functions.wp-styles.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    144144 *
    145145 * @param string      $handle Name of the stylesheet.
    146146 * @param string|bool $src    Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
    147  * @param array       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
     147 * @param array|string       $deps   An array of registered style handles this stylesheet depends on. Default empty array.
    148148 * @param string|bool $ver    String specifying the stylesheet version number, if it has one. This parameter is used
    149149 *                            to ensure that the correct version is sent to the client regardless of caching, and so
    150150 *                            should be included if a version number is available and makes sense for the stylesheet.
  • wp-includes/class.wp-dependencies.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    210210         *
    211211         * @param string $handle Unique item name.
    212212         * @param string $src    The item url.
    213          * @param array  $deps   Optional. An array of item handle strings on which this item depends.
     213         * @param array|string  $deps   Optional. An array of item handle strings on which this item depends.
    214214         * @param string $ver    Optional. Version (used for cache busting).
    215215         * @param mixed  $args   Optional. Custom property of the item. NOT the class property $args. Examples: $media, $in_footer.
    216216         * @return bool Whether the item has been registered. True on success, false on failure.
     
    485485         */
    486486        public function __construct() {
    487487                @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
    488                 if ( ! is_array($this->deps) )
    489                         $this->deps = array();
     488                if ( ! is_array( $this->deps ) ) {
     489                        $this->deps = is_string( $this->deps ) ? array( $this->deps ) : array();
     490                }
    490491        }
    491492
    492493        /**