HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/insiders/wp-load/wp-content/plugins/gutenmate/block-library/headline.php
<?php

/**
 * Registers the `gtm/headline` block on the server.
 */
function gtm_register_block_headline() {
	gtm_register_block_type( 'headline' );
}

add_action( 'init', 'gtm_register_block_headline', 20 );

add_filter( 'gtm.BlockStyleCompiler.gtm/headline', 'gtm_compile_block_css_headline', 10, 3 );
function gtm_compile_block_css_headline( $output, $attributes, $blockName ) {
	$block_style = ['classes' => [], 'style' => []];

	$block_style['classes'][] = 'gtm-block';

	gtm_css_compileCssVar( $block_style, "headline-max-width", $attributes['maxWidth'] );

	// Eyebrow
	gtm_css_compileCssVar( $block_style, "headline-eyebrow-color", gtm_css_parseColorValue( $attributes['eyebrowColor'] ) );
	gtm_css_compileCssVar( $block_style, "headline-eyebrow-spacing", gtm_css_parseSpacingValue( $attributes['eyebrowSpacing'] ) );
	gtm_css_compileCssVar( $block_style, "headline-eyebrow-typography", gtm_css_parseTypographyProps( $attributes['eyebrowTypography'] ) );

	// Main headline
	gtm_css_compileCssVar( $block_style, "headline-color", gtm_css_parseColorValue( $attributes['headlineColor'] ) );
	gtm_css_compileCssVar( $block_style, "headline-typography", gtm_css_parseTypographyProps( $attributes['headlineTypography'] ) );

	// Tagline
	gtm_css_compileCssVar( $block_style, "headline-tagline-color", gtm_css_parseColorValue( $attributes['taglineColor'] ) );
	gtm_css_compileCssVar( $block_style, "headline-tagline-spacing", gtm_css_parseSpacingValue( $attributes['taglineSpacing'] ) );
	gtm_css_compileCssVar( $block_style, "headline-tagline-typography", gtm_css_parseTypographyProps( $attributes['taglineTypography'] ) );

	// 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'] ),
	];
}