WP_HTML_Attribute_Token::__construct( string $name, int $value_start, int $value_length, int $start, int $length, bool $is_true )

In this article

Constructor.

Parameters

$namestringrequired
Attribute name.
$value_startintrequired
Attribute value.
$value_lengthintrequired
Number of bytes attribute value spans.
$startintrequired
The string offset where the attribute name starts.
$lengthintrequired
Byte length of the entire attribute name or name and value pair expression.
$is_trueboolrequired
Whether the attribute is a boolean attribute with true value.

Source

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;
}

Changelog

VersionDescription
6.5.0Replaced end with length to more closely match substr().
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.