WordPress.org

Make WordPress Core

Changeset 32898


Ignore:
Timestamp:
06/21/2015 07:34:03 PM (7 years ago)
Author:
boonebgorges
Message:

Pass stylesheet URL as an argument to 'style_loader_tag' filter.

This change brings the filter's signature in line with 'script_loader_tag'.

Props nicholas_io.
Fixes #32660.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-styles.php

    r32657 r32898  
    8585         *
    8686         * @since 2.6.0
     87         * @since 4.3.0 Introduced the `$href` parameter.
    8788         *
    8889         * @param string         The link tag for the enqueued style.
    8990         * @param string $handle The style's registered handle.
     91         * @param string $href   The stylesheet's source URL.
    9092         */
    91         $tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle );
     93        $tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-css' $title href='$href' type='text/css' media='$media' />\n", $handle, $href );
    9294        if ( 'rtl' === $this->text_direction && isset($obj->extra['rtl']) && $obj->extra['rtl'] ) {
    9395            if ( is_bool( $obj->extra['rtl'] ) || 'replace' === $obj->extra['rtl'] ) {
     
    99101
    100102            /** This filter is documented in wp-includes/class.wp-styles.php */
    101             $rtl_tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle );
     103            $rtl_tag = apply_filters( 'style_loader_tag', "<link rel='$rel' id='$handle-rtl-css' $title href='$rtl_href' type='text/css' media='$media' />\n", $handle, $rtl_href );
    102104
    103105            if ( $obj->extra['rtl'] === 'replace' ) {
Note: See TracChangeset for help on using the changeset viewer.