HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: /var/www/kevin-demo/wp-content/themes/fitmencook/blocks/fmc-media/fmc-media.php
<?php

$title = get_field('title');
$style = get_field_object('style');

$class = 'fmc_media spacing_1_0';
if ( ! empty( $block['className'] ) ) {
    $class .= ' ' . $block['className'];
}
if ( ! empty( $style ) ) {
    $class .=  ' ' . $style['value'];
}

?>

<div class="<?php echo $class; ?>">
	<div class="fmc_container">
		<h2 class="fmc_title_1 title_spacing_2"><?php echo $title; ?></h2>
		<div class="fmc_media_content">
		<?php
		// Check rows existexists.
		if( have_rows('media_column') ):

			// Loop through rows.
			while( have_rows('media_column') ) : the_row();

				// Load sub field value.
				$logo = get_sub_field('logo');
				$image = get_sub_field('image');
				$size = 'full';
				$col_text = get_sub_field('col_text');
				$button_text_and_link = get_sub_field('button_text_and_link');
				// Do something... ?>
				<div class="fmc_media_col">
					<?php if( $logo ) {
						echo wp_get_attachment_image( $logo, $size, "", array('class' => 'fmc_media_logo') );
					} ?>
					<?php if($col_text) : ?>
					<div class="col_text">
						<?php echo $col_text; ?>
					</div>
					<?php endif; ?>
					<div class="fmc_col_content">
					<?php if( $image ) {
						echo wp_get_attachment_image( $image, $size, "", array('class' => 'fmc_media_image') );
					} ?>
					<?php if( $button_text_and_link ):
						$link_url = $button_text_and_link['url'];
						$link_title = $button_text_and_link['title'];
						$link_target = $button_text_and_link['target'] ? $button_text_and_link['target'] : '_self';
						?>
					<a class="fmc_btn" href="<?php echo esc_url( $link_url ); ?>" target="<?php echo esc_attr( $link_target ); ?>"><?php echo esc_html( $link_title ); ?></a>
					<?php endif; ?>
					</div>
				</div>
			<?php // End loop.
			endwhile;
		endif; ?>
		</div>
	</div>
</div>