WP_HTML_Attribute_Token::__construct
Constructor.
Method of the class: WP_HTML_Attribute_Token{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_HTML_Attribute_Token = new WP_HTML_Attribute_Token(); $WP_HTML_Attribute_Token->__construct( $name, $value_start, $value_length, $start, $length, $is_true );
- $name(string) (required)
- Attribute name.
- $value_start(int) (required)
- Attribute value.
- $value_length(int) (required)
- Number of bytes attribute value spans.
- $start(int) (required)
- The string offset where the attribute name starts.
- $length(int) (required)
- Byte length of the entire attribute name or name and value pair expression.
- $is_true(true|false) (required)
- Whether the attribute is a boolean attribute with true value.
Changelog
| Since 6.2.0 | Introduced. |
| Since 6.5.0 | Replaced end with length to more closely match substr(). |
WP_HTML_Attribute_Token::__construct() WP HTML Attribute Token:: construct code WP 6.9
public function __construct( $name, $value_start, $value_length, $start, $length, $is_true ) {
$this->name = $name;
$this->value_starts_at = $value_start;
$this->value_length = $value_length;
$this->start = $start;
$this->length = $length;
$this->is_true = $is_true;
}