woo_directives_mark_interactive_blocks()
Хуков нет.
Возвращает
null
. Ничего.
Использование
woo_directives_mark_interactive_blocks( $block_content, $block, $instance );
- $block_content (обязательный)
- -
- $block (обязательный)
- -
- $instance (обязательный)
- -
Код woo_directives_mark_interactive_blocks() woo directives mark interactive blocks WC 7.7.2
function woo_directives_mark_interactive_blocks( $block_content, $block, $instance ) { if ( woo_directives_get_client_side_navigation() ) { return $block_content; } // Append the `data-woo-ignore` attribute for inner blocks of interactive blocks. if ( isset( $instance->parsed_block['isolated'] ) ) { $w = new WP_HTML_Tag_Processor( $block_content ); $w->next_tag(); $w->set_attribute( 'data-woo-ignore', true ); $block_content = (string) $w; } // Return if it's not interactive. if ( ! block_has_support( $instance->block_type, array( 'interactivity' ) ) ) { return $block_content; } // Add the `data-woo-island` attribute if it's interactive. $w = new WP_HTML_Tag_Processor( $block_content ); $w->next_tag(); $w->set_attribute( 'data-woo-island', true ); return (string) $w; }