Automattic\WooCommerce\EmailEditor\Integrations\Utils

Dom_Document_Helper::get_element_inner_htmlpublicWC 1.0

Returns the inner HTML of the given element.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$Dom_Document_Helper = new Dom_Document_Helper();
$Dom_Document_Helper->get_element_inner_html( $element ): string;
$element(DOMElement) (обязательный)
The element to get the inner HTML from.

Код Dom_Document_Helper::get_element_inner_html() WC 9.9.5

public function get_element_inner_html( \DOMElement $element ): string {
	$inner_html = '';
	$children   = $element->childNodes; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
	foreach ( $children as $child ) {
		if ( ! $child instanceof \DOMNode ) {
			continue;
		}
		$inner_html .= $this->dom->saveHTML( $child );
	}
	return $inner_html;
}