W3cubDocs

/WordPress

WP_HTML_Text_Replacement::__construct( int $start, int $length, string $text )

Constructor.

Parameters

$startintrequired
Byte offset into document where replacement span begins.
$lengthintrequired
Byte length of span in document being replaced.
$textstringrequired
Span of text to insert in document to replace existing content from start to end.

Source

public function __construct( int $start, int $length, string $text ) {
	$this->start  = $start;
	$this->length = $length;
	$this->text   = $text;
}

Changelog

Version Description
6.2.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_html_text_replacement/__construct