File: /var/www/html/insiders/wp-load/wp-content/plugins/breadly/block-library/content-area-column.php
<?php
/**
* Registers the `gtm/content-area-column` block on the server.
*/
function gtm_register_block_content_area_column() {
gtm_register_block_type( 'content-area-column' );
}
add_action( 'init', 'gtm_register_block_content_area_column', 20 );
add_filter( 'gtm.BlockStyleCompiler.gtm/content-area-column', 'gtm_compile_block_css_content_area_column', 10, 3 );
function gtm_compile_block_css_content_area_column( $output, $attributes, $blockName ) {
$block_style = ['classes' => [], 'style' => []];
$isSidebar = $attributes['role'] == 'sidebar';
$block_style['classes'][] = 'gtm-block';
if ( $isSidebar && $attributes['enableSticky'] ) {
$block_style['classes'][] = 'gtm-has-content-area-column-sticky';
}
if ( $attributes['role'] ) {
$block_style['classes'][] = "gtm-has-content-area-column-role-{$attributes['role']}";
}
if ( $isSidebar ) {
gtm_css_compileCssVar( $block_style, "content-area-column-width", $attributes['width'] );
}
// 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'] ),
];
}