WP_Block_Processor::get_html_content(): string|null

In this article

Returns the string content of a matched HTML span, or null otherwise.

Return

string|null Raw HTML content, or null if not currently matched on HTML.

Source

public function get_html_content(): ?string {
	if ( ! $this->is_html() ) {
		return null;
	}

	return substr(
		$this->source_text,
		$this->after_previous_delimiter,
		$this->matched_delimiter_at - $this->after_previous_delimiter
	);
}

Changelog

VersionDescription
6.9.0Introduced.

User Contributed Notes

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