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/breadly/block-library/amp-code.php
<?php

/**
 * Registers the `gtm/amp-code` block on the server.
 */
function gtm_register_block_amp_code() {
	gtm_register_block_type( 'amp-code', [
		'render_callback' => 'gtm_render_block_amp_code',
	] );
}

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

/**
 * Renders the `gtm/amp-code` block on the server.
 *
 * @param array    $attributes Block attributes.
 * @param string   $content    Block default content.
 * @param WP_Block $block      Block instance.
 * @return string Returns the breadcrumbs.
 */
function gtm_render_block_amp_code( $attr, $content, $block ) {
	if ( ! empty( $attr['script'] ) ) {
		gtm_use_amp_script( $attr['script'] );
	}

	return $content;
}