Convenience function that sets up a new element
public addElement ( string $element, string | boolean $type, string $contents, array $attr_includes = [], array $attr = [] ) : HTMLPurifier_ElementDef | ||
$element | string | Name of element to add |
$type | string | boolean | What content set should element be registered to? Set as false to skip this step. |
$contents | string | Allowed children in form of: "$content_model_type: $content_model" |
$attr_includes | array | What attribute collections to register to element? |
$attr | array | What unique attributes does the element define? |
return | HTMLPurifier_ElementDef | Created element definition object, so you can set advanced parameters |