From MediaWiki.org
Jump to navigation Jump to search
Available from version ???
Allows for adjusting or replacing the StylePropertySanitizer used when sanitizing style rules. For example, you might add, remove, or redefine known properties.
Define function:
public static function onTemplateStylesPropertySanitizer( &$propertySanitizer, $matcherFactory ) { ... }
Attach hook:
$wgHooks['TemplateStylesPropertySanitizer'][] = 'MyExtensionHooks::onTemplateStylesPropertySanitizer';
Called from:File(s): TemplateStyles / TemplateStylesHooks.php

For more information about attaching hooks, see $1.
For examples of other extensions using this hook, see Category:TemplateStylesPropertySanitizer extensions.


Wikimedia\CSS\Sanitizer\StylePropertySanitizer to be used for sanitization.
Wikimedia\CSS\Grammar\MatcherFactory being used, for use in adding or redefining known properties or replacing the entire sanitizer.