WP_Block_Parser::parse()
Parses a document and returns a list of block structures
When encountering an invalid parse will return a best-effort parse. In contrast to the specification parser this does not return an error on invalid inputs.
Метод класса: WP_Block_Parser{}
Хуков нет.
Возвращает
Массив[]
.
Использование
$WP_Block_Parser = new WP_Block_Parser(); $WP_Block_Parser->parse( $document );
- $document(строка) (обязательный)
- Input document being parsed.
Список изменений
С версии 5.0.0 | Введена. |
Код WP_Block_Parser::parse() WP Block Parser::parse WP 6.4.2
public function parse( $document ) { $this->document = $document; $this->offset = 0; $this->output = array(); $this->stack = array(); while ( $this->proceed() ) { continue; } return $this->output; }