Make WordPress Core

Ticket #33957: 33957.patch

File 33957.patch, 3.5 KB (added by sebastian.pisula, 9 years ago)
  • wp-includes/class.wp-dependencies.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    213213         * @param array  $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.
     216         * @param array  $extra
    216217         * @return bool True on success, false on failure.
    217218         */
    218         public function add( $handle, $src, $deps = array(), $ver = false, $args = null ) {
     219        public function add( $handle, $src, $deps = array(), $ver = false, $args = null, $extra = array() ) {
    219220                if ( isset($this->registered[$handle]) )
    220221                        return false;
    221                 $this->registered[$handle] = new _WP_Dependency( $handle, $src, $deps, $ver, $args );
     222                $this->registered[$handle] = new _WP_Dependency( $handle, $src, $deps, $ver, $args, $extra );
    222223                return true;
    223224        }
    224225
     
    484485         * @since 2.6.0
    485486         */
    486487        public function __construct() {
    487                 @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args ) = func_get_args();
     488                @list( $this->handle, $this->src, $this->deps, $this->ver, $this->args, $this->extra ) = func_get_args();
    488489                if ( ! is_array($this->deps) )
    489490                        $this->deps = array();
    490491        }
  • wp-includes/functions.wp-styles.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    107107 * @param string      $media  Optional. The media for which this stylesheet has been defined.
    108108 *                            Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
    109109 *                            'screen', 'tty', or 'tv'.
     110 * @param array       $extra
    110111 */
    111 function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
     112function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = 'all', $extra = array() ) {
    112113        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
    113114
    114         wp_styles()->add( $handle, $src, $deps, $ver, $media );
     115        wp_styles()->add( $handle, $src, $deps, $ver, $media, $extra );
    115116}
    116117
    117118/**
     
    148149 * @param string      $media  Optional. The media for which this stylesheet has been defined.
    149150 *                            Default 'all'. Accepts 'all', 'aural', 'braille', 'handheld', 'projection', 'print',
    150151 *                            'screen', 'tty', or 'tv'.
     152 * @param array       $extra
    151153 */
    152 function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all' ) {
     154function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = 'all', $extra = array() ) {
    153155        global $wp_styles;
    154156        _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );
    155157
     
    157159
    158160        if ( $src ) {
    159161                $_handle = explode('?', $handle);
    160                 $wp_styles->add( $_handle[0], $src, $deps, $ver, $media );
     162                $wp_styles->add( $_handle[0], $src, $deps, $ver, $media, $extra );
    161163        }
    162164        $wp_styles->enqueue( $handle );
    163165}