Свойство | 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 |
Свойство | 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. ' |
Méthode | 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 |
Méthode | 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 | |
Résultat | WPDKHTMLTag |
protected afterContent ( ) |
protected beforeContent ( ) |
public static sanitizeAttributes ( string $attributes ) : array | ||
$attributes | string | Attribute inline |
Résultat | array |
public static sanitizeData ( string $attributes ) : array | ||
$attributes | string | Data attribute inline |
Résultat | array |
public setPropertiesByArray ( array $properties = [] ) | ||
$properties | array | A key value pairs array with the property (key) and its value |
protected array $attributes | ||
Résultat | array |
protected string $close | ||
Résultat | string |
public array $data | ||
Résultat | array |
protected string $open | ||
Résultat | string |