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.236

Latest news

  • ProcessWire Weekly #550
    In the 550th issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a new third party module called PagefileMetadata, and more. Read on!
    Weekly.pw / 23 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull