public function onStyleLoaderTag($tag, $handle): string
    {
        $tag    = (string) $tag;
        $handle = (string) $handle;

        if (!($style = $this->didEnqueueStyle($handle))) {
            return $tag; // We did not enqueue this style.
        }
        if ($style['sri'] !== '' && !preg_match('/\sintegrity\s*\=/ui', $tag)) {
            if (($sri = $style['sri']) || ($sri = $this->c::sri($style['url']))) {
                $tag = str_replace(' rel=', ' integrity="'.esc_attr($sri).'" crossorigin="anonymous" rel=', $tag);
            } // NOTE: SRI may or may not be possible right now. Always check if `$sri` is non-empty.
            // NOTE: `c::sri()` also will not return an SRI for local resources on the current hostname.
        }
        return $tag; // Possibly modifed above.
    }
public function onStyleLoaderTag($tag, $handle): string
    {
        $tag    = (string) $tag;
        $handle = (string) $handle;

        if (!($style = $this->didEnqueueStyle($handle))) {
            return $tag; // We did not enqueue this style.
        }
        if ($style['sri'] !== '' && !preg_match('/\sintegrity\s*\=/ui', $tag)) {
            if (($sri = $style['sri']) || ($sri = $this->c::sri($style['url']))) {
                $tag = str_replace(' rel=', ' integrity="'.esc_attr($sri).'" crossorigin="anonymous" rel=', $tag);
            } // NOTE: SRI may or may not be possible right now. Always check if `$sri` is non-empty.
            // NOTE: `c::sri()` also will not return an SRI for local resources on the current hostname.
        }
        return $tag; // Possibly modifed above.
    }
public function onStyleLoaderTag ( $ tag , $ handle ) : string { $ tag = ( string ) $ tag ; $ handle = ( string ) $ handle ; if ( ! ( $ style = $ this -> didEnqueueStyle ( $ handle ) ) ) { return $ tag ; // We did not enqueue this style. } if ( $ style [ 'sri' ] !== '' && ! preg_match ( '/\sintegrity\s*\=/ui' , $ tag ) ) { if ( ( $ sri = $ style [ 'sri' ] ) || ( $ sri = $ this -> c :: sri ( $ style [ 'url' ] ) ) ) { $ tag = str_replace ( ' rel=' , ' integrity="' . esc_attr ( $ sri ) . '" crossorigin="anonymous" rel=' , $ tag ) ; } // NOTE: SRI may or may not be possible right now. Always check if `$sri` is non-empty. // NOTE: `c::sri()` also will not return an SRI for local resources on the current hostname. } return $ tag ; // Possibly modifed above. }
On `style_loader_tag`.

@since 170218.31677 Scripts/styles.

@param string|scalar $tag    HTML markup.
@param string|scalar $handle Style handle.

@return string Possible-modified HTML tag.
On style_loader_tag .