ÿØÿÛ C 

ÿØÿÛ C 

<?php
	$marin_map_disabled = get_theme_mod( 'marin_map_disabled', true );
if ( true === $marin_map_disabled ) {
	$marin_map_content        = get_theme_mod( 'marin_map_content', MARIN_MAP_DEFAULT_CONTENT );
	$marin_map_container_size = get_theme_mod( 'marin_map_container_size', 'av-container' );
	$marin_map_meta_disabled  = get_theme_mod( 'marin_map_meta_disabled', true );
	?>
	<section id="contactmap-section" class="contactmap-section av-py-default">
		<div class="<?php echo esc_attr( $marin_map_container_size ); ?>">
			<div class="av-columns-area wow fadeInUp">
				<?php if ( true === $marin_map_meta_disabled ) { ?>
					<div class="av-md-column-6 ml-md-0 mx-auto">
						<div class="contactmapinfo">
							<?php
							if ( ! empty( $marin_map_content ) ) {
								$marin_map_content = json_decode( $marin_map_content );
								foreach ( $marin_map_content as $map_item ) {
									$title    = ! empty( $map_item->title ) ? apply_filters( 'marin_translate_single_string', $map_item->title, 'map section' ) : '';
									$subtitle = ! empty( $map_item->subtitle ) ? apply_filters( 'marin_translate_single_string', $map_item->subtitle, 'map section' ) : '';
									$text     = ! empty( $map_item->text ) ? apply_filters( 'marin_translate_single_string', $map_item->text, 'map section' ) : '';
									$link     = ! empty( $map_item->link ) ? apply_filters( 'marin_translate_single_string', $map_item->link, 'map section' ) : '';
									$icon     = ! empty( $map_item->icon_value ) ? apply_filters( 'marin_translate_single_string', $map_item->icon_value, 'map section' ) : '';
									?>
									<aside class="widget widget-contact">
										<div class="contact-area">
											<?php if ( ! empty( $icon ) ) : ?>
												<div class="contact-icon"><i class="fa <?php echo esc_attr( $icon ); ?>" aria-hidden="true"></i></div>
											<?php endif; ?>
											<?php if ( ! empty( $title ) || ! empty( $subtitle ) || ! empty( $text ) ) : ?>
												<div class="contact-info">
													<span class="title"><?php echo esc_html( $title ); ?></span>
													<span class="subtitle"><?php echo esc_html( $subtitle ); ?><br><?php echo esc_html( $text ); ?></span>
												</div>
											<?php endif; ?>
										</div>
									</aside>
									<?php
								}
							}
							?>
						</div>
					</div>
				<?php } ?>
				<div class="map">
				<?php
				function marin_has_any_shortcode( $content ) {
					// Regular expression pattern to match shortcodes.
					$pattern = get_shortcode_regex();

					// Check if the content matches the shortcode pattern.
					return preg_match( "/$pattern/", $content );
				}

				$marin_map_editor_content = get_theme_mod( 'marin_map_editor_content', '<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2551.035208337379!2d55.38677205153398!3d25.28038656673523!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x3e5f5c3a36c00ca1%3A0xf6f2e2440f986498!2sUAE+Exchange!5e0!3m2!1sen!2sin!4v1549444468862" width="100%" height="472" frameborder="0" style="border:0"></iframe>' );

				if ( get_theme_mod( 'azeem_map_disable', true ) == true ) {
					$has_shortcode = marin_has_any_shortcode( $marin_map_editor_content );

					if ( $has_shortcode ) {
						echo do_shortcode( $marin_map_editor_content );
					} else {
						$allowed_html = array(
							'iframe' => array(
								'src'                   => array(),
								'width'                 => array(),
								'height'                => array(),
								'frameborder'           => array(),
								'style'                 => array(),
								'allowfullscreen'       => array(),
								'webkitallowfullscreen' => array(),
								'mozallowfullscreen'    => array(),
							),
						);

						echo wp_kses( $marin_map_editor_content, $allowed_html );
					}
				}
				?>
				</div>
			</div>
		</div>
	</section>
<?php } ?>
