File: /var/www/html/insiders/wp-load/wp-content/plugins/gutenmate/block-library/content-area.php
<?php
/**
* Registers the `gtm/content-area` block on the server.
*/
function gtm_register_block_content_area() {
gtm_register_block_type( 'content-area' );
}
add_action( 'init', 'gtm_register_block_content_area', 20 );
add_filter( 'gtm.BlockStyleCompiler.gtm/content-area', 'gtm_compile_block_css_content_area', 10, 3 );
function gtm_compile_block_css_content_area( $output, $attributes, $blockName ) {
$block_style = ['classes' => [], 'style' => []];
$block_style['classes'][] = 'gtm-block';
$block_style['classes'][] = "gtm-has-content-area-layout-{$attributes['contentLayout']}";
if ( $attributes['enableSeparator'] ) {
$block_style['classes'][] = 'gtm-has-content-area-separator';
}
gtm_css_compileCssVar( $block_style, "content-area-content-spacing", gtm_css_parseSpacingValue( $attributes['contentSpacing'] ) );
gtm_css_compileCssVar( $block_style, "content-area-separator-style", $attributes['separatorStyle'] );
gtm_css_compileCssVar( $block_style, "content-area-separator-color", gtm_css_parseColorValue( $attributes['separatorColor'] ) );
gtm_css_compileCssVar( $block_style, "content-area-separator-thickness", $attributes['separatorThickness'] );
// 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'] ),
];
}