WP_Block_Processor::__construct
Creates a new block processor.
Example:
$processor = new WP_Block_Processor( $post_content );
if ( $processor->next_block( 'core/image' ) ) {
echo "Found an image!\n";
}
Метод класса: WP_Block_Processor{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_Block_Processor = new WP_Block_Processor(); $WP_Block_Processor->__construct( $source_text );
- $source_text(строка) (обязательный)
- Input document potentially containing block content.
Заметки
- Смотрите: self::next_block() to advance to the start of the next block (skips closers).
- Смотрите: self::next_delimiter() to advance to the next explicit block delimiter.
- Смотрите: self::next_token() to advance to the next block delimiter or HTML span.
Список изменений
| С версии 6.9.0 | Введена. |
Код WP_Block_Processor::__construct() WP Block Processor:: construct WP 6.9.1
public function __construct( string $source_text ) {
$this->source_text = $source_text;
}