ProCacheFileMerger::mergeCSSFilesInMarkup()

Given contents of an HTML document merge and minify <link rel='stylesheet'> tags

If any of the tags have an href attribute that contains "?NoMinify" it will be skipped.

Usage

// basic usage
$string = $proCacheFileMerger->mergeCSSFilesInMarkup(string $html);

// usage with all arguments
$string = $proCacheFileMerger->mergeCSSFilesInMarkup(string $html, bool $minify = true);

Arguments

NameType(s)Description
$htmlstring

HTML document markup

$minify (optional)bool

Minfiy also? Default:true

Return value

string

Updated HTML markup


ProCacheFileMerger methods and properties

API reference based on ProcessWire core version 3.0.251