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/tab.php
<?php

/**
 * Renders the `gtm/tab` 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 featured image for the current post.
 */
function gtm_render_block_tab( $attr, $content, $block ) {
	$tabs_id = gtm_id_current( 'gtm-tabs' );
	$tab_id  = gtm_id( 'gtm-tab' );

	$id      = $tabs_id . '-' . $tab_id;
	$checked = $tab_id == 'gtm-tab-1' ? 'checked' : '';

	$before = '<input type="radio" id="' . esc_attr( $id ) . '" name="' . esc_attr( $tabs_id ) . '" class="wp-block-gtm-tab__control" ' . $checked . ' />';
	$before .= '<label for="' . esc_attr( $id ) . '" class="wp-block-gtm-tab__pill">';

	if ( ! empty( $attr['icon'] ) ) {
		$before .= gtm_icon( $attr['icon'] );
	}

	if ( ! empty( $attr['label'] ) ) {
		$before .= '<span>' . wp_kses_post( $attr['label'] ) . '</span>';
	}

	$before .= '</label>';

	return $before . $content;
}

/**
 * Registers the `gtm/tab` block on the server.
 */
function gtm_register_block_tab() {
	gtm_register_block_type( 'tab', [
		'render_callback' => 'gtm_render_block_tab',
	] );
}

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