Property | Type | Description | |
---|---|---|---|
$__version | string | Override version | |
$accesskey | Global attributes | ||
$class | |||
$content | string | HTML inner content of tag. | |
$contenteditable | |||
$contextmenu | |||
$data | array | Key value pairs array Attribute data: data-attribute = value | |
$dir | |||
$draggable | |||
$dropzone | |||
$hidden | |||
$id | |||
$lang | |||
$onclick | |||
$spellcheck | |||
$style | |||
$tabindex | |||
$tagName | WPDKHTMLTagName | The TAG name | |
$title | string | Title |
Property | Type | Description | |
---|---|---|---|
$attributes | array | Override. List of tag attributes that can be used on any HTML element. | |
$close | string | Override. Close format Eg. '' or '/>' | |
$open | string | Override. Open format Eg. ' |
Method | Description | |
---|---|---|
__construct ( string $tag_name ) : WPDKHTMLTag | Create an instance of WPDKHTMLTag class | |
addClass ( string $class ) | Utility to add a class. You can access directly to class array property instead | |
addData ( string $name, string $value ) | Utility to add a data attribute. You can access directly to data array property instead | |
attributeInline ( array $attributes, array | boolean $additional_attributes = false ) : string | Return a inline generic attribute | |
classInline ( array | string $classes, array | boolean $additional_classes = false ) : string | Return a sanitize and inline list of css classes | |
dataInline ( array $data, array | boolean $additional_data = false ) : string | Return a inline data attribute | |
display ( ) | Display HTML markup for this tag | |
draw ( ) | Draw the content of tag | |
html ( ) : string | Return the HTML markup for this tag | |
mergeClasses ( array | string $class, array | string $class2 = null, array | string $_ = null ) : array | Merge one or more class | |
sanitizeAttributes ( string $attributes ) : array | Return a key value pairs array with generic attribute list | |
sanitizeClasses ( string | array $classes ) : array | Return key value pairs array unique with css class list. In this way you can unset a secified class. | |
sanitizeData ( string $attributes ) : array | Return a key value pairs array with data attribute list | |
sanitizeStyles ( string | array $styles ) : array | Return key value pairs array unique with css styke list. In this way you can unset a secified class. | |
setPropertiesByArray ( array $properties = [] ) | Set one or more WPDKHTMLTag properties by an array. | |
styleInline ( array | string $styles, array | boolean $additional_styles = false ) : string | Return a sanitize and inline list of css styles |
Method | Description | |
---|---|---|
afterContent ( ) | Override this method to display anything after the content output | |
beforeContent ( ) | Override this method to display anything before the content output |
public __construct ( string $tag_name ) : WPDKHTMLTag | ||
$tag_name | string | |
return | WPDKHTMLTag |
protected afterContent ( ) |
protected beforeContent ( ) |
public static sanitizeAttributes ( string $attributes ) : array | ||
$attributes | string | Attribute inline |
return | array |
public static sanitizeData ( string $attributes ) : array | ||
$attributes | string | Data attribute inline |
return | array |
public setPropertiesByArray ( array $properties = [] ) | ||
$properties | array | A key value pairs array with the property (key) and its value |
protected array $attributes | ||
return | array |
protected string $close | ||
return | string |
public array $data | ||
return | array |
protected string $open | ||
return | string |