Automattic\WooCommerce\EmailEditor\Integrations\Core\Renderer\Blocks
Table::is_striped_table
Check if the table has striped styling.
Метод класса: Table{}
Хуков нет.
Возвращает
true|false. True if it's a striped table, false otherwise.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_striped_table( $block_content, $parsed_block ): bool;
- $block_content(строка) (обязательный)
- Block content.
- $parsed_block(массив) (обязательный)
- Parsed block.
Код Table::is_striped_table() Table::is striped table WC 10.4.3
private function is_striped_table( string $block_content, array $parsed_block ): bool {
// Check for is-style-stripes in block attributes.
if ( isset( $parsed_block['attrs']['className'] ) && false !== strpos( $parsed_block['attrs']['className'], 'is-style-stripes' ) ) {
return true;
}
// Check for is-style-stripes in figure classes.
if ( false !== strpos( $block_content, 'is-style-stripes' ) ) {
return true;
}
return false;
}