WP_Block_Processor::get_html_content
Returns the string content of a matched HTML span, or null otherwise.
Method of the class: WP_Block_Processor{}
No Hooks.
Returns
String|null. Raw HTML content, or null if not currently matched on HTML.
Usage
$WP_Block_Processor = new WP_Block_Processor(); $WP_Block_Processor->get_html_content(): ?string;
Changelog
| Since 6.9.0 | Introduced. |
WP_Block_Processor::get_html_content() WP Block Processor::get html content code 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
);
}