File: /var/www/html/insiders/wp-load/wp-content/plugins/gutenmate/block-extensions/block-printing.php
<?php
/**
* Render block style
*/
add_filter( 'gtm.BlockStyleCompiler.' . GTM_GLOBAL_BLOCK_STYLE, 'gtm_compile_block_css_block_printing', 10, 3 );
function gtm_compile_block_css_block_printing( $output, $attributes, $blockName ) {
$block_style = ['classes' => [], 'style' => []];
if ( ! empty( $attributes['gtmPrinting'] ) ) {
if ( $attributes['gtmPrinting'] == 'hide' ) {
$block_style['classes'][] = 'gtm-no-print';
} else if ( $attributes['gtmPrinting'] == 'exclusive' ) {
$block_style['classes'][] = 'gtm-exclusive-print';
}
}
// Apply to output
$block_style['style'] = ['{{BLOCK}}' => $block_style['style']];
return [
'classes' => array_merge( $output['classes'], $block_style['classes'] ),
'style' => array_replace_recursive( $output['style'], $block_style['style'] ),
];
}