Automattic\WooCommerce\Blocks\Templates
ArchiveProductTemplatesCompatibility::is_null_post_template
The core/post-template has two different block names:
- core/post-template when the wrapper is rendered.
- core/null when the loop item is rendered.
Метод класса: ArchiveProductTemplatesCompatibility{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_null_post_template( $block );
- $block(массив) (обязательный)
- Parsed block data.
Код ArchiveProductTemplatesCompatibility::is_null_post_template() ArchiveProductTemplatesCompatibility::is null post template WC 10.4.3
private function is_null_post_template( $block ) {
$block_name = $block['blockName'];
return 'core/null' === $block_name && ( $this->is_block_inherited( $block ) || $this->is_block_within_namespace( $block ) );
}