WP_Block_Processor::get_html_contentpublicWP 6.9.0

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

Метод класса: WP_Block_Processor{}

Хуков нет.

Возвращает

Строку|null. Raw HTML content, or null if not currently matched on HTML.

Использование

$WP_Block_Processor = new WP_Block_Processor();
$WP_Block_Processor->get_html_content(): ?string;

Список изменений

С версии 6.9.0 Введена.

Код WP_Block_Processor::get_html_content() WP 6.9.1

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