File: /var/www/html/insiders/wp-load/wp-content/plugins/gutenmate/block-library/spacer.php
<?php
/**
* Registers the `gtm/spacer` block on the server.
*/
function gtm_register_block_spacer() {
gtm_register_block_type( 'spacer' );
}
add_action( 'init', 'gtm_register_block_spacer', 20 );
add_filter( 'gtm.BlockStyleCompiler.gtm/spacer', 'gtm_compile_block_css_spacer', 10, 3 );
function gtm_compile_block_css_spacer( $output, $attributes, $blockName ) {
$block_style = ['classes' => [], 'style' => []];
$block_style['classes'][] = 'gtm-block';
gtm_css_compileCssVar( $block_style, "spacer-size", gtm_css_parseSpacingValue( $attributes['size'] ) );
// 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'] ),
];
}