ProCacheMinifyHTML class

Located in file /site/modules/ProCache/ProCacheMinifyHTML.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon.

Show class?             Show args?        

Common

NameReturnSummary 
ProCacheMinifyHTML::blankAttrs string array Attributes that may be removed when blank (default=see _construct method) 
ProCacheMinifyHTML::blocks string array Tags that we will collapse whitespace around (default=see _construct method) 
ProCacheMinifyHTML::collapseBooleanAttr bool Collapse boolean attributes, where allowed by HTML5? (default=true) 
ProCacheMinifyHTML::convertURLs(string $html, string $rootURL, string $currentURL)
(nothing)Convert URLs from absolute to relative where shorter 
ProCacheMinifyHTML::convertXHTML bool Convert XHTML style "/>" closing tags to HTML ">"? (default=true) 
ProCacheMinifyHTML::cssMinifyFunction callable Function to use for CSS minification (default=null) 
ProCacheMinifyHTML::getOption($name)
null boolGet the value for an option 
ProCacheMinifyHTML::getOptions()
arrayGet the current set options in key => value array 
ProCacheMinifyHTML::ignoreTags string array Tags that should be ignored during minification (default=see _construct method) 
ProCacheMinifyHTML::jsminifyFunction callable Function to use for JS minification (default=null) 
ProCacheMinifyHTML::minify($html)
(nothing) 
ProCacheMinifyHTML::minifyInlineCSS(string $html)
intMinify a CSS string, for inline CSS minification 
ProCacheMinifyHTML::minifyInlineJS(string $html)
intMinify inline javascript within an HTML document 
ProCacheMinifyHTML::removeBlankAttr bool Remove blank attributes, where allowed? (configurable, default=true) 
ProCacheMinifyHTML::removeComments bool Remove HTML comments? (default=true) 
ProCacheMinifyHTML::removeUnnecessaryAttr bool Remove unnecessary/redundant attributes from HTML tags? (default=true) 
ProCacheMinifyHTML::removeUnnecessaryTags bool Remove unnecessary/redundant HTML tags? (default=true) 
ProCacheMinifyHTML::setBlocks($blocks)
$thisSet the block level elements (whitespace removed around these elements) 
ProCacheMinifyHTML::setCSSMinifyFunction(callable $func)
$thisSet the CSS minify callback function 
ProCacheMinifyHTML::setIgnoreTags($tags)
$thisSet the tags that should be ignored 
ProCacheMinifyHTML::setJSMinifyFunction(callable $func)
$thisSet the javascript minify callback function 
ProCacheMinifyHTML::setOption(string $name, bool $value)
$thisSet a minify option 
ProCacheMinifyHTML::setOptions(array $options)
$thisSet multiple options at once in key => value array 
ProCacheMinifyHTML::setRemoveBlankAttrs($attributes)
$thisAttribute names that will be removed when blank 
ProCacheMinifyHTML::unquoteAttr bool Remove quotes from attributes, where allowed by HTML5? (default=true) 

API reference based on ProcessWire core version 3.0.244

Latest news

  • ProcessWire Weekly #559
    The 559th issue of ProcessWire Weekly brings in all the latest news from the ProcessWire community. Modules, sites, and more. Read on!
    Weekly.pw / 25 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer