HtmlPruner::removeRedundantClasses( string[] $classesToKeep = array() )

Removes classes that are no longer required (e.g. because there are no longer any CSS rules that reference them) from class attributes.


Description Description

Note that this does not inspect the CSS, but expects to be provided with a list of classes that are still in use.

This method also has the (presumably beneficial) side-effect of minifying (removing superfluous whitespace from) class attributes.


Parameters Parameters

$classesToKeep

(Optional) names of classes that should not be removed

Default value: array()


Top ↑

Return Return

(self) fluent interface


Top ↑

Source Source

File: vendor/pelago/emogrifier/src/Emogrifier/HtmlProcessor/HtmlPruner.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.