WP_Block_Parser::freeform │ public │ WP 5.0.0

Returns a new block object for freeform HTML

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

Хуков нет.

Возвращает

WP_Block_Parser_Block. freeform block object.

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

$WP_Block_Parser = new WP_Block_Parser();
$WP_Block_Parser->freeform( $inner_html );
$inner_html(строка) (обязательный)
HTML content of block.

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

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

Код WP_Block_Parser::freeform() WP 7.1.4

public function freeform( $inner_html ) {
	return new WP_Block_Parser_Block( null, array(), array(), $inner_html, array( $inner_html ) );
}