Your IP : 216.73.216.95


Current Path : /var/test/www/ya/wp-content/themes/youthy/framework/
Upload File :
Current File : /var/test/www/ya/wp-content/themes/youthy/framework/theme-options.php

<?php

/* #######################################################################

	Theme Options

####################################################################### */

function meanthemes_register_theme_customizer( $wp_customize ) {

	// Font size array at top for easy access
	$font_size = array (

			'10' => '10px',
			'11' => '11px',
			'12' => '12px',
			'13' => '13px',
			'14' => '14px',
			'15' => '15px',
			'16' => '16px',
			'17' => '17px',
			'18' => '18px',
			'19' => '19px',
			'20' => '20px',
			'21' => '21px',
			'22' => '22px',
			'23' => '23px',
			'24' => '24px',
			'25' => '25px',
			'26' => '26px',
			'27' => '27px',
			'28' => '28px',
			'29' => '29px',
			'30' => '30px',
			'31' => '31px',
			'32' => '32px',
			'33' => '33px',
			'34' => '34px',
			'35' => '35px',
			'36' => '36px',
			'37' => '37px',
			'38' => '38px',
			'39' => '39px',
			'40' => '40px',
			'41' => '41px',
			'42' => '42px',
			'43' => '43px',
			'44' => '44px',
			'45' => '45px',
			'46' => '46px',
			'47' => '47px',
			'48' => '48px',
			'49' => '49px',
			'50' => '50px',
			'51' => '51px',
			'52' => '52px',
			'53' => '53px',
			'54' => '54px',
			'55' => '55px',
			'56' => '56px',
			'57' => '57px',
			'58' => '58px',
			'59' => '59px',
			'60' => '60px',
			'61' => '61px',
			'62' => '62px',
			'63' => '63px',
			'64' => '64px',
			'65' => '65px',
			'66' => '66px',
			'67' => '67px',
			'68' => '68px',
			'69' => '69px',
			'70' => '70px',
			'71' => '71px',
			'72' => '72px',
			'73' => '73px',
			'74' => '74px',
			'75' => '75px',
			'76' => '76px',
			'77' => '77px',
			'78' => '78px',
			'79' => '79px',
			'80' => '80px',
			'81' => '81px',
			'82' => '82px',
			'83' => '83px',
			'84' => '84px',
			'85' => '85px',
			'86' => '86px',
			'87' => '87px',
			'88' => '88px',
			'89' => '89px',
			'90' => '90px',
			'91' => '91px',
			'92' => '92px',
			'93' => '93px',
			'94' => '94px',
			'95' => '95px',
			'96' => '96px',
			'97' => '97px',
			'98' => '98px',
			'99' => '99px',
			'100' => '100px',
			'110' => '110px',
			'120' => '120px',
			'130' => '130px',
			'140' => '140px',
			'150' => '150px',
			'160' => '160px',
			'170' => '170px',
			'180' => '180px',
			'190' => '190px',
			'200' => '200px',

	);



	//Colours
	$black			            = "#000000";
	$white			            = "#ffffff";
	$default			          = "#2a3437";
	$accent      	          = "#009ae9";
	$altaccent      	      = "#ea4256";
	$accenthover    	      = "#1a2123";
	$greyline               = "#edeeee";
	$lightgrey              = "#f5f5f5";
	$secondaryaccent        = "#46c570";
	$offwhite			          = "#fafafa";
	$placeholder            = "#737171";
	$backgroundgrey         = "#ea4256";
	$altgrey                = "#96adb9";
	$altdefault             = "#233239";



	// Extend Functionality of Customizer...
	class Text_Control_Generic extends WP_Customize_Control {
		public $type = 'text_control';

		public function render_content() {
				?>
						<label>
								<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
								<textarea rows="9" style="width:100%;" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
						</label>
				<?php
		}
}


	//
	// General Settings
	//

	$wp_customize->add_section(
	    'meanthemes_general_options',
	    array(
	        'title'     => __('General Settings','meanthemes'),
	        'priority'  => 0
	    )
	);
/*

	 $wp_customize->add_setting(
			'new_off',
			array(
					'default'    =>  false,
					'sanitize_callback' => 'esc_html'
			)
	);


	$wp_customize->add_control(
			'new_off',
			array(
					'section'   => 'meanthemes_general_options',
					'label'     => __('Turn off New Notification above?','meanthemes'),
					'type'      => 'checkbox',
					'priority' => 0
			)
	);
*/





					$wp_customize->add_setting(
					'icon_links',
							array(
									'default'    =>  '1',
									'sanitize_callback' => 'esc_html'
							)
				);

				$wp_customize->add_control(
					'icon_links',
						array(
								'section'   => 'meanthemes_general_options',
								'label'     => __('Show little icons next to popular file extensions on links e.g. .pdf, .xls"','meanthemes'),
								'type'      => 'checkbox',
								'priority'  => 1
						)
				);

				$wp_customize->add_setting(
				'blog_more_button',
						array(
								'default'    =>  false,
								'sanitize_callback' => 'esc_html'
						)
			);

			$wp_customize->add_control(
				'blog_more_button',
					array(
							'section'   => 'meanthemes_general_options',
							'label'     => __('Hide Blog "more"','meanthemes'),
							'type'      => 'checkbox',
							'priority'  => 1
					)
			);

				 $wp_customize->add_setting(
					'hide_social_share',
				      array(
				          'default'    =>  false,
									'sanitize_callback' => 'esc_html'
				      )
	  		);

				$wp_customize->add_control(
					'hide_social_share',
				    array(
				        'section'   => 'meanthemes_general_options',
				        'label'     => __('Hide Social Share','meanthemes'),
				        'type'      => 'checkbox',
				        'priority'  => 8
				    )
				);



				 $wp_customize->add_setting(
					'hide_comments',
				     array(
				         'default'    =>  false,
								 'sanitize_callback' => 'esc_html'
				     )
				 );

				$wp_customize->add_control(
					'hide_comments',
				    array(
				        'section'   => 'meanthemes_general_options',
				        'label'     => __('Hide Comments','meanthemes'),
				        'type'      => 'checkbox',
				        'priority'  => 9
				    )
				);

				$wp_customize->add_setting(
					'show_comments_page',
				     array(
				         'default'    =>  false,
								 'sanitize_callback' => 'esc_html'
				     )
				 );

				$wp_customize->add_control(
					'show_comments_page',
				    array(
				        'section'   => 'meanthemes_general_options',
				        'label'     => __('Enable Comments on Pages','meanthemes'),
				        'type'      => 'checkbox',
				        'priority'  => 9
				    )
				);

				$wp_customize->add_setting(
			'hide_comments_when_closed_per_post',
			array(
					'default'    =>  false,
					'sanitize_callback' => 'esc_html'
			)
	);


	$wp_customize->add_control(
			'hide_comments_when_closed_per_post',
			array(
					'section'   => 'meanthemes_general_options',
					'label'     => __('Hide Comments when "Comments are Closed" per post','meanthemes'),
					'type'      => 'checkbox',
					'priority'  => 10
			)
	);

				$wp_customize->add_setting(
					'hide_related',
						array(
								'default'    =>  false,
								'sanitize_callback' => 'esc_html'
						)
				);

				$wp_customize->add_control(
					'hide_related',
						array(
								'section'   => 'meanthemes_general_options',
								'label'     => __('Hide Related Blog Items','meanthemes'),
								'type'      => 'checkbox',
								'priority'  => 11
						)
				);

				$wp_customize->add_setting(
					'team_link',
						array(
								'default'    =>  false,
								'sanitize_callback' => 'esc_html'
						)
				);

				$wp_customize->add_control(
					'team_link',
						array(
								'section'   => 'meanthemes_general_options',
								'label'     => __('Make team items into links to individual pages','meanthemes'),
								'type'      => 'checkbox',
								'priority'  => 14
						)
				);

				$wp_customize->add_setting(
					'nav_reversal',
						array(
								'default'    =>  false,
								'sanitize_callback' => 'esc_html'
						)
				);

				$wp_customize->add_control(
					'nav_reversal',
						array(
								'section'   => 'meanthemes_general_options',
								'label'     => __('Reverse Prev/Next pagination on Services/Events/Team','meanthemes'),
								'type'      => 'checkbox',
								'priority'  => 15
						)
				);

				$wp_customize->add_setting(
					'show_event_date',
						array(
								'default'    =>  false,
								'sanitize_callback' => 'esc_html'
						)
				);

				$wp_customize->add_control(
					'show_event_date',
						array(
								'section'   => 'meanthemes_general_options',
								'label'     => __('Show a date as well as time on Events','meanthemes'),
								'type'      => 'checkbox',
								'priority'  => 16
						)
				);






				$wp_customize->add_setting(
					'twitter_username',
				    array(
				        'default'   => '',
								'sanitize_callback' => 'esc_html'
				    )
				);

				$wp_customize->add_control(
					'twitter_username',
				    array(
				        'section'  => 'meanthemes_general_options',
				        'label'    => __('Twitter Username','meanthemes'),
				        'type'     => 'text',
				        'priority'  => 99
				    )
				);





				// Header Settings

				$wp_customize->add_section(
						'header_options',
						array(
								'title'     => __('Header Settings','meanthemes'),
								'description' => __( 'The contact header phone number and email address are also used in the footer section, you can switch this off with the "Hide Footer contact details" option in Footer Settings.' ,'meanthemes' ),
								'priority'  => 5
						)
				);



									$wp_customize->add_setting(
										'hide_logo_text',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_logo_text',
											array(
													'section'   => 'header_options',
													'label'     => __('Hide Plain Text logo','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 2
											)
									);

									$wp_customize->add_setting(
										'hide_tagline',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_tagline',
											array(
													'section'   => 'header_options',
													'label'     => __('Hide Tagline','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 3
											)
									);

									$wp_customize->add_setting(
										'hide_menu',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_menu',
											array(
													'section'   => 'header_options',
													'label'     => __('Hide Main Menu','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 4
											)
									);

									$wp_customize->add_setting(
										'hide_contact_header',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_contact_header',
											array(
													'section'   => 'header_options',
													'label'     => __('Hide Contact Header','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 5
											)
									);

									$wp_customize->add_setting(
											'content_contact_tel',
											array(
													'default'   => '',
													'sanitize_callback' => 'esc_html',
											)
									);

									$wp_customize->add_control(
											'content_contact_tel',
											array(
													'section'  => 'header_options',
													'label'    => __( 'Contact Header: Phone Number' , 'meanthemes' ),
													'type'     => 'text',
													'priority' => 6
											)
									);

									$wp_customize->add_setting(
											'content_contact_email',
											array(
													'default'   => '',
													'sanitize_callback' => 'esc_html',
											)
									);

									$wp_customize->add_control(
											'content_contact_email',
											array(
													'section'  => 'header_options',
													'label'    => __( 'Contact Header: Email' , 'meanthemes' ),
													'type'     => 'text',
													'priority' => 7
											)
									);

									$wp_customize->add_setting(
										'header_background_image',
											array(
													'default'      => '',
													'sanitize_callback' => 'esc_url',
													'priority' => 99
											)
									);

									$wp_customize->add_control(
											new WP_Customize_Image_Control(
													$wp_customize,
													'header_background_image',
													array(
															'label'    => __('Header Background Image','meanthemes'),
															'description' => __( 'Something around 1440x300px will be ideal.' ,'meanthemes' ),
															'section'  => 'header_options'
													)
											)
									);

									$wp_customize->add_setting(
											'header_height',
											array(
													'default'   => '',
													'sanitize_callback' => 'esc_html',
											)
									);

									$wp_customize->add_control(
											'header_height',
											array(
													'section'  => 'header_options',
													'label'    => __( 'Set Header height' , 'meanthemes' ),
													'description' => __( 'Enter the px/em/rem value here e.g. 400px.' ,'meanthemes' ),
													'type'     => 'text',
													'priority' => 101
											)
									);



									// Layout Settings

									$wp_customize->add_section(
											'footer_options',
											array(
													'title'     => __('Footer Settings','meanthemes'),
													'description' => __( 'Set up all of your footer settings here. The contact details will be borrowed from the Header Settings.' , 'meanthemes' ),
													'priority'  => 6
											)
									);



									$wp_customize->add_setting(
										'hide_footer_menu',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_footer_menu',
											array(
													'section'   => 'footer_options',
													'label'     => __('Hide Footer Menu','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 0
											)
									);


									$wp_customize->add_setting(
										'hide_backtotop',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_backtotop',
											array(
													'section'   => 'footer_options',
													'label'     => __('Hide Back To Top link','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 2
											)
									);

									$wp_customize->add_setting(
												'content_footer_motivation', array(
												'sanitize_callback' => 'wp_kses'
											) );

										$wp_customize->add_control(
												new Text_Control_Generic( $wp_customize, 'text_control_motivation',
														array(
																'label' => 'Motivation Text',
																'section' => 'footer_options',
																'settings' => 'content_footer_motivation',
																'priority' => 3
														)
												)
										);

									$wp_customize->add_setting(
										'hide_footer_motivation',
											array(
													'default'    =>  false,
													'sanitize_callback' => 'esc_html'
											)
									);

									$wp_customize->add_control(
										'hide_footer_motivation',
											array(
													'section'   => 'footer_options',
													'label'     => __('Hide Footer motivation text','meanthemes'),
													'type'      => 'checkbox',
													'priority'  => 4
											)
									);

									$wp_customize->add_setting( 'footer_tagline', array(
												'default' => '&copy; 2015 Youthy. Built by <a href="http://www.meanthemes.com" target="_blank">MeanThemes</a>',
												'sanitize_callback' => 'wp_kses'
											) );

				        	   $wp_customize->add_control(
				        	       new Text_Control_Generic( $wp_customize, 'text_control_footer',
				        	           array(
				        	               'label' => 'Footer Tagline',
				        	               'section' => 'footer_options',
				        	               'settings' => 'footer_tagline',
				        	               'priority' => 5
				        	           )
				        	       )
				        	   );

										$wp_customize->add_setting(
											'hide_footer_copyright',
												array(
														'default'    =>  false,
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'hide_footer_copyright',
												array(
														'section'   => 'footer_options',
														'label'     => __('Hide Footer tagline','meanthemes'),
														'type'      => 'checkbox',
														'priority'  => 6
												)
										);

										$wp_customize->add_setting(
											'hide_footer_contact',
												array(
														'default'    =>  false,
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'hide_footer_contact',
												array(
														'section'   => 'footer_options',
														'label'     => __('Hide Footer contact details','meanthemes'),
														'type'      => 'checkbox',
														'priority'  => 7
												)
										);





		// Sidebar Settings
		$wp_customize->add_section(
				'sidebar_options',
				array(
						'title'     => __('Sidebar Settings','meanthemes'),
						'description' => __( 'You can configure sidebars showing across the whole theme right here.' ,'meanthemes' ),
						'priority'  => 5
				)
		);

					$wp_customize->add_setting(
						'hide_sidebar',
							array(
								'default'    =>  true,
								'sanitize_callback' => 'esc_html'
							)
					);

					$wp_customize->add_control(
						'hide_sidebar',
					array(
						'section'   => 'sidebar_options',
						'label'     => __('Hide All Sidebars','meanthemes'),
						'type'      => 'checkbox',
						'priority'  => 2
						)
					);

					$wp_customize->add_setting(
						'hide_sidebar_page',
					array(
						'default'    =>  false,
						'sanitize_callback' => 'esc_html'
						)
					);

					$wp_customize->add_control(
						'hide_sidebar_page',
					array(
						'section'   => 'sidebar_options',
						'label'     => __('Hide Sidebar on just pages','meanthemes'),
						'type'      => 'checkbox',
						'priority'  => 3
						)
					);

					$wp_customize->add_setting(
						'hide_sidebar_post',
					array(
						'default'    =>  false,
						'sanitize_callback' => 'esc_html'
						)
					);

					$wp_customize->add_control(
						'hide_sidebar_post',
					array(
						'section'   => 'sidebar_options',
						'label'     => __('Hide Sidebar on just posts','meanthemes'),
						'type'      => 'checkbox',
						'priority'  => 4
						)
					);

					$wp_customize->add_setting(
						'hide_sidebar_service',
					array(
						'default'    =>  false,
						'sanitize_callback' => 'esc_html'
						)
					);

					$wp_customize->add_control(
						'hide_sidebar_service',
					array(
						'section'   => 'sidebar_options',
						'label'     => __('Hide Sidebar on just service pages','meanthemes'),
						'type'      => 'checkbox',
						'priority'  => 5
						)
					);

					$wp_customize->add_setting(
						'hide_sidebar_team',
					array(
						'default'    =>  false,
						'sanitize_callback' => 'esc_html'
						)
					);

					$wp_customize->add_control(
						'hide_sidebar_team',
					array(
						'section'   => 'sidebar_options',
						'label'     => __('Hide Sidebar on just team pages','meanthemes'),
						'type'      => 'checkbox',
						'priority'  => 6
						)
					);



					$wp_customize->add_setting(
						'sidebar_switch',
							array(
									'default'    =>  false,
									'sanitize_callback' => 'esc_html'
							)
					);

					$wp_customize->add_control(
						'sidebar_switch',
							array(
									'section'   => 'sidebar_options',
									'label'     => __('Switch all sidebars to left instead of right','meanthemes'),
									'type'      => 'checkbox',
									'priority'  => 9
							)
					);


		// Contact Page Settings
		$wp_customize->add_section(
				'contact_page_options',
				array(
						'title'     => __('Contact Page Settings','meanthemes'),
						'description' => __( 'You will need to register a key for Google Maps API v3. <a href="https://developers.google.com/maps/documentation/javascript/tutorial">More information is available here</a>. Make sure you enter latitude,longitude (with comma in the middle of them)' ,'meanthemes' ),
						'priority'  => 7
				)
		);

							$wp_customize->add_setting(
								'map_api_key',
									array(
											'default'    =>  '',
											'sanitize_callback' => 'esc_html'
									)
							);

							$wp_customize->add_control(
								'map_api_key',
									array(
											'section'   => 'contact_page_options',
											'label'     => __('Enter Map API','meanthemes'),
											'type'      => 'text',
											'priority'  => 0
									)
							);

							$wp_customize->add_setting(
								'map_lat_long',
									array(
											'default'    =>  '',
											'sanitize_callback' => 'esc_html'
									)
							);

							$wp_customize->add_control(
								'map_lat_long',
									array(
											'section'   => 'contact_page_options',
											'label'     => __('Enter Map Latitude and Longitude','meanthemes'),
											'type'      => 'text',
											'priority'  => 0
									)
							);

							$wp_customize->add_setting(
								'map_pin',
									array(
											'default'      => '',
											'transport'    => 'postMessage',
											'sanitize_callback' => 'esc_html',
											'priority' => 0
									)
							);

							$wp_customize->add_control(
									new WP_Customize_Image_Control(
											$wp_customize,
											'map_pin',
											array(
													'label'    => __('Map Pin','meanthemes'),
													'section'  => 'contact_page_options'
											)
									)
							);


							//
							// Woo Commerce Specific
							//

							if ( class_exists( 'WooCommerce' ) ) {

										if ( current_theme_supports( 'woocommerce' )  )  {


											$wp_customize->add_section(
											'woocommerce_options',
											array(
												'title'     => __('WooCommerce Settings','meanthemes'),
												'description' => __( 'Please note, as the checkout and cart pages of WooCommerce are pages, activating the sidebar below will only activate the sidebar on product and archive pages for WooCommerce.' ,'meanthemes' ),
												'priority'  => 10
												)
											);

											$wp_customize->add_setting(
											'show_woocommerce_styles',
											array(
												'default'    =>  '1',
												'sanitize_callback' => 'esc_html'
											)
										);

											$wp_customize->add_control(
											'show_woocommerce_styles',
											array(
												'section'   => 'woocommerce_options',
												'label'     => __('Load Theme Specific WooCommerce CSS','meanthemes'),
												'type'      => 'checkbox',
												'priority'  => 2
												)
											);

											$wp_customize->add_setting(
											'show_sidebar_woocommerce',
											array(
												'default'    =>  false,
												'sanitize_callback' => 'esc_html'
											)
										);

											$wp_customize->add_control(
											'show_sidebar_woocommerce',
											array(
												'section'   => 'woocommerce_options',
												'label'     => __('Show Sidebar on WooCommerce','meanthemes'),
												'type'      => 'checkbox',
												'priority'  => 2
												)
											);

											$wp_customize->add_setting(
											'show_woocommerce_cart_total',
											array(
												'default'    =>  "1",
												'sanitize_callback' => 'esc_html'
											)
										);

											$wp_customize->add_control(
											'show_woocommerce_cart_total',
											array(
												'section'   => 'woocommerce_options',
												'label'     => __('Show Cart total in Menu area','meanthemes'),
												'type'      => 'checkbox',
												'priority'  => 3
												)
											);


									}

							}



						//
						// Colours
						//
							$wp_customize->add_setting(
								'color_default',
											array(
													'default'     => $default,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_default',
											array(
													'label'      => __( 'Default Font Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 1
											)
									)
							);

							$wp_customize->add_setting(
								'color_accent',
											array(
													'default'     => $accent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_accent',
											array(
													'label'      => __( 'Accent Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 2
											)
									)
							);

							$wp_customize->add_setting(
								'color_accenthover',
											array(
													'default'     => $accenthover,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_accenthover',
											array(
													'label'      => __( 'Heading &amp; Accent Hover Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 3
											)
									)
							);


							$wp_customize->add_setting(
								'color_nav_link',
											array(
													'default'     => $white,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_nav_link',
											array(
													'label'      => __( 'Top Navigation Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 4
											)
									)
							);

							$wp_customize->add_setting(
								'color_nav_link_hover',
											array(
													'default'     => $white,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_nav_link_hover',
											array(
													'label'      => __( 'Top Navigation Hover Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 5
											)
									)
							);

							$wp_customize->add_setting(
								'color_over_overlays',
											array(
													'default'     => $white,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_over_overlays',
											array(
													'label'      => __( 'Color over overlays e.g. heroes, 404', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 6
											)
									)
							);

							$wp_customize->add_setting(
								'color_meta',
											array(
													'default'     => $altgrey,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'color_meta',
											array(
													'label'      => __( 'Meta Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 7
											)
										)
								);


							// Background colors
							$wp_customize->add_setting(
								'bg_color_body',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_body',
											array(
													'label'      => __( 'Body Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 99
											)
									)
							);


							$wp_customize->add_setting(
								'bg_color_wrap',
											array(
													'default'     => $white,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_wrap',
											array(
													'label'      => __( 'Main Wrap Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 100
											)
									)
							);



							$wp_customize->add_setting(
								'bg_color_post',
											array(
													'default'     => $white,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_post',
											array(
													'label'      => __( 'Post, Comments Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 101
											)
									)
							);

							$wp_customize->add_setting(
								'bg_color_header',
											array(
													'default'     => $default,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_header',
											array(
													'label'      => __( 'Navigation Header Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 102
											)
									)
							);

							$wp_customize->add_setting(
								'bg_color_grey',
											array(
													'default'     => $lightgrey,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_grey',
											array(
													'label'      => __( 'Light Grey background &amp; border colors', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 103
											)
									)
							);



							$wp_customize->add_setting(
								'bg_color_service',
											array(
													'default'     => $accent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_service',
											array(
													'label'      => __( 'Homepage Service block Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 105
											)
									)
							);



							$wp_customize->add_setting(
								'bg_color_contact_header',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_contact_header',
											array(
													'label'      => __( 'Contact Header bar Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 107
											)
									)
							);


							$wp_customize->add_setting(
								'bg_color_footer',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_footer',
											array(
													'label'      => __( 'Footer Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 107
											)
									)
							);

							$wp_customize->add_setting(
								'bg_color_cat',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_cat',
											array(
													'label'      => __( 'Categories Blob Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 108
											)
									)
							);


							$wp_customize->add_setting(
								'bg_color_tag',
											array(
													'default'     => $altgrey,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_tag',
											array(
													'label'      => __( 'Tags Blob Background Color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 109
											)
									)
							);


							$wp_customize->add_setting(
								'bg_color_h1',
											array(
													'default'     => $accent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_h1',
											array(
													'label'      => __( 'Heading 1 Overlay color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 111
											)
									)
							);


							$wp_customize->add_setting(
								'bg_color_h2',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_h2',
											array(
													'label'      => __( 'Heading 2 Overlay color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 112
											)
									)
							);





							$wp_customize->add_setting(
								'bg_color_post_mobile_menu',
											array(
													'default'     => $altaccent,
													'sanitize_callback' => 'sanitize_hex_color'
											)
									);

							$wp_customize->add_control(
									new WP_Customize_Color_Control(
											$wp_customize,
												'bg_color_post_mobile_menu',
											array(
													'label'      => __( 'Mobile Menu Background color', 'meanthemes' ),
													'section'    => 'colors',
													'priority'  => 113
											)
									)
							);





        //
        // Fonts
        //

        $wp_customize->add_section(
					'meanthemes_font',
            array(
                'title'     => __('Fonts','meanthemes'),
                'priority'  => 68
            )
        );

						        $wp_customize->add_setting(
											'font_main',
						            array(
						                'default'   => 'Karla',
														'sanitize_callback' => 'esc_html'
						            )
						        );

						        $wp_customize->add_control(
											'font_main',
						            array(
						                'section'  => 'meanthemes_font',
						                'label'    => __('Main Font','meanthemes'),
						                'type'     => 'select',
						                'choices'  => array(
																'Karla' => 'Karla (Default)',
						                    'Special Elite' => 'Special Elite',
																'Helvetica Neue' => 'Helvetica Neue',
						                    'helvetica' => 'Helvetica',
						                    'arial'     => 'Arial',
						                    'verdana'   => 'Verdana',
						                    'times'     => 'Times New Roman',
						                    'georgia'   => 'Georgia',
						                    'courier'   => 'Courier New'
						                ),
						                'priority' => 1
						            )
						        );

						        $wp_customize->add_setting(
											'font_headings',
						            array(
						                'default'   => 'Special Elite',
														'sanitize_callback' => 'esc_html'
						            )
						        );

						        $wp_customize->add_control(
											'font_headings',
						            array(
						                'section'  => 'meanthemes_font',
						                'label'    => __('Heading Font','meanthemes'),
						                'type'     => 'select',
						                'choices'  => array(
																'Special Elite' => 'Special Elite (Default)',
																'Karla' => 'Karla',
						                    'Helvetica Neue' => 'Helvetica Neue',
						                    'helvetica' => 'Helvetica',
						                    'arial'     => 'Arial',
						                    'verdana'   => 'Verdana',
						                    'times'     => 'Times New Roman',
						                    'georgia'   => 'Georgia',
						                    'courier'   => 'Courier New'
						                ),
						                'priority' => 2
						            )
						        );

										$wp_customize->add_setting(
											'font_blockquote',
						            array(
						                'default'   => 'Special Elite',
														'sanitize_callback' => 'esc_html'
						            )
						        );

						        $wp_customize->add_control(
											'font_blockquote',
						            array(
						                'section'  => 'meanthemes_font',
						                'label'    => __('BlockQuote Font','meanthemes'),
						                'type'     => 'select',
						                'choices'  => array(
																'Special Elite' => 'Special Elite (Default)',
																'Karla' => 'Karla',
						                    'Helvetica Neue' => 'Helvetica Neue',
						                    'helvetica' => 'Helvetica',
						                    'arial'     => 'Arial',
						                    'verdana'   => 'Verdana',
						                    'times'     => 'Times New Roman',
						                    'georgia'   => 'Georgia',
						                    'courier'   => 'Courier New'
						                ),
						                'priority' => 3
						            )
						        );


										$wp_customize->add_setting(
											'font_size_body',
												array(
														'default'   => '16',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'font_size_body',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Body Font Size (Default: 16px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 5
												)
										);

										$wp_customize->add_setting(
											'font_size_h1',
												array(
														'default'   => '48',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'font_size_h1',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 1 &amp; Archive Heading (Default: 48px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 6
												)
										);

										$wp_customize->add_setting(
											'font_size_h2',
												array(
														'default'   => '38',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'font_size_h2',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 2 (Default: 38px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 7
												)
										);

										$wp_customize->add_setting(
											 'font_size_h3',
												array(
														'default'   => '32',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'font_size_h3',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 3 (Default: 32px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 8
												)
										);

										$wp_customize->add_setting(
											'font_size_h4',
												array(
														'default'   => '26',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
											'font_size_h4',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 4 &amp; Site Title (Default: 26px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 9
												)
										);

										$wp_customize->add_setting(
												'font_size_h5',
												array(
														'default'   => '22',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
												'font_size_h5',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 5 (Default: 22px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 10
												)
										);

										$wp_customize->add_setting(
												'font_size_h6',
												array(
														'default'   => '20',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
												'font_size_h6',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Heading 6 &amp; Tagline (Default: 20px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 11
												)
										);




										$wp_customize->add_setting(
												'meta',
												array(
														'default'   => '14',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
												'meta',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Meta Size (Default: 14px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 13
												)
										);


										$wp_customize->add_setting(
												'font_size_site_title',
												array(
														'default'   => '48',
														'sanitize_callback' => 'esc_html'
												)
										);

										$wp_customize->add_control(
												'font_size_site_title',
												array(
														'section'  => 'meanthemes_font',
														'label'    => __('Site Title (Default: 48px)','meanthemes'),
														'type'     => 'select',
														'choices'  => $font_size,
														'priority' => 13
												)
										);

										$wp_customize->add_setting(
										'font_uppercase',
										array(
											'default'   => false,
											'sanitize_callback' => 'esc_html'
										)
									);

									$wp_customize->add_control(
									'font_uppercase',
									array(
										'section'  => 'meanthemes_font',
										'label'    => __('Uppercase titles, site title etc.','meanthemes'),
										'type'     => 'checkbox',
										'priority' => 99
										)
									);




        //
        // Fonts
        //

        $wp_customize->add_section(
				'font_advanced',
            array(
                'title'     => __('Fonts Advanced','meanthemes'),
                'description'	=>	__( 'We support <a href="https://www.google.com/fonts" target="_blank">Google web fonts</a>, <a href="https://typekit.com/fonts" target="_blank">Typekit</a> and <a href="http://html.adobe.com/edge/webfonts/" target="_blank">Adobe Web fonts</a>. Please refer to the documentation and paste the appropriate code in to the Font Service Code block below then enter the font family as they tell you to in the Font Family textboxes for Heading &amp; Main. Finally choose your font-weight. <br /><br /><strong>You need to save and publish to view your changes</strong>.' , 'meanthemes' ),
                'priority'  => 69
            )
        );

        //
        // Font Service
        //

				$wp_customize->add_setting(
            'font_advanced_service_choice',
            array(
                'default'   => '',
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            'font_advanced_service_choice',
            array(
                'section'  => 'font_advanced',
                'label'    => __('Choose the font service','meanthemes'),
                'type'     => 'select',
                'priority' => 0,
                'choices'  => array(
										'' => ' ',
										'google' => 'Google',
                    'typekit' => 'Typekit',
                    'adobe' => 'Adobe'
                )
            )
        );


        $wp_customize->add_setting(
            'font_advanced_service',
            array(
                'default'   => '',
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            new Text_Control_Generic(
                $wp_customize, 'font_advanced_service',
                array(
                    'label' => 'Service Code',
                    'section' => 'font_advanced',
                    'settings' => 'font_advanced_service',
                    'priority' => 1,
                )
            )
        );

        $wp_customize->add_setting(
            'font_advanced_service_main',
            array(
                'default'   => '',
								'sanitize_callback' => 'esc_html'
            )
        );


        $wp_customize->add_control(
            'font_advanced_service_main',
            array(
                'section'   => 'font_advanced',
                'label'     => __( 'Main Font Family' , 'meanthemes' ),
                'type'      => 'text',
                'priority' => 2
            )
        );

        $wp_customize->add_setting(
            'font_advanced_service_main_weight',
            array(
                'default'   => '400',
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            'font_advanced_service_main_weight',
            array(
                'section'  => 'font_advanced',
                'label'    => __('Font Weight for Main','meanthemes'),
                'type'     => 'select',
                'priority' => 3,
                'choices'  => array(
                    '100' => 'Thin (100)',
                    '200' => 'Extra-light (200)',
                    '300' => 'Light (300)',
                    '400'     => 'Normal (400)',
                    '500'   => 'Medium (500)',
                    '600'     => 'Semi-Bold (600)',
                    '700'   => 'Bold (700)',
                    '800'   => 'Extra-Bold (800)',
                    '900' => 'Ultra-Bold (900)'
                )
            )
        );

        $wp_customize->add_setting(
            'font_advanced_service_heading_weight',
            array(
                'default'   => '600',
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            'font_advanced_service_heading_weight',
            array(
                'section'  => 'font_advanced',
                'label'    => __('Font Weight for Headings','meanthemes'),
                'type'     => 'select',
                'priority' => 4,
                'choices'  => array(
                    '100' => 'Thin (100)',
                    '200' => 'Extra-light (200)',
                    '300' => 'Light (300)',
                    '400'     => 'Normal (400)',
                    '500'   => 'Medium (500)',
                    '600'     => 'Semi-Bold (600)',
                    '700'   => 'Bold (700)',
                    '800'   => 'Extra-Bold (800)',
                    '900' => 'Ultra-Bold (900)'
                )
            )
        );

        $wp_customize->add_setting(
            'font_advanced_service_heading_oblique',
            array(
                'default'   => false,
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            'font_advanced_service_heading_oblique',
            array(
                'section'   => 'font_advanced',
                'label'     => __('Italicise Heading?','meanthemes'),
                'type'      => 'checkbox',
                'priority' => 4
            )
        );

        $wp_customize->add_setting(
            'font_advanced_service_headings',
            array(
                'default'   => '',
								'sanitize_callback' => 'esc_html'
            )
        );

        $wp_customize->add_control(
            'font_advanced_service_headings',
            array(
                'section'   => 'font_advanced',
                'label'     => __( 'Heading Font Family' , 'meanthemes' ),
                'type'      => 'text',
                'priority' => 3
            )
        );


        //
        // Image uploads
        //

        $wp_customize->add_section(
            'image_options',
            array(
                'title'     => __('Image Uploads','meanthemes'),
                'description' => '',
                'priority'  => 70
            )
        );

										$wp_customize->add_setting(
												'meanthemes_logo_image',
												array(
														'default'      => '',
														'transport'    => 'postMessage',
														'sanitize_callback' => 'esc_url',
														'priority' => 0
												)
										);

										$wp_customize->add_control(
												new WP_Customize_Image_Control(
														$wp_customize,
														'meanthemes_logo_image',
														array(
																'label'    => __('Logo','meanthemes'),
																'settings' => 'meanthemes_logo_image',
																'description' => __( 'Something around 120x30px will be ideal.' ,'meanthemes' ),
																'section'  => 'image_options'
														)
												)
										);

						        $wp_customize->add_setting(
						            'meanthemes_logo_image_retina',
						            array(
						                'default'      => '',
						                'transport'    => 'postMessage',
														'sanitize_callback' => 'esc_url',
						                'priority' => 1
						            )
						        );

						        $wp_customize->add_control(
						            new WP_Customize_Image_Control(
						                $wp_customize,
						                'meanthemes_logo_image_retina',
						                array(
						                    'label'    => __('Logo (Retina)','meanthemes'),
						                    'settings' => 'meanthemes_logo_image_retina',
																'description' => __( 'This should be double the size of your regular logo with the same aspect ratio, something around 240x60px will be ideal.' ,'meanthemes' ),
						                    'section'  => 'image_options'
						                )
						            )
						        );

						        $wp_customize->add_setting(
						            'favicon_image',
						            array(
						                'default'      => '',
						                'transport'    => 'postMessage',
														'sanitize_callback' => 'esc_url',
						                'priority' => 4
						            )
						        );

						        $wp_customize->add_control(
						            new WP_Customize_Image_Control(
						                $wp_customize,
						                'favicon_image',
						                array(
						                    'label'    => __('Upload Favicon (32x32px)','meanthemes'),
						                    'settings' => 'favicon_image',
						                    'section'  => 'image_options'
						                )
						            )
						        );

						        $wp_customize->add_setting(
						            'appleicon_image',
						            array(
						                'default'      => '',
						                'transport'    => 'postMessage',
														'sanitize_callback' => 'esc_url',
						                'priority' => 5
						            )
						        );


						        $wp_customize->add_control(
						            new WP_Customize_Image_Control(
						                $wp_customize,
						                'appleicon_image',
						                array(
						                    'label'    => __('Upload Apple Touch Icon (152x152px)','meanthemes'),
						                    'settings' => 'appleicon_image',
						                    'section'  => 'image_options'
						                )
						            )
						        );

										$wp_customize->add_setting(
						            'image_404',
						            array(
						                'default'      => '',
														'sanitize_callback' => 'esc_url',
						                'priority' => 6
						            )
						        );


						        $wp_customize->add_control(
						            new WP_Customize_Image_Control(
						                $wp_customize,
						                'image_404',
						                array(
						                    'label'    => __('404 Page Image','meanthemes'),
						                    'settings' => 'image_404',
																'description' => __( 'Something around 1440x750px will be ideal.' ,'meanthemes' ),
						                    'section'  => 'image_options'
						                )
						            )
						        );


										$wp_customize->add_setting(
						            'image_body_bg',
						            array(
						                'default'      => '',
														'sanitize_callback' => 'esc_url',
						                'priority' => 99
						            )
						        );


						        $wp_customize->add_control(
						            new WP_Customize_Image_Control(
						                $wp_customize,
						                'image_body_bg',
						                array(
						                    'label'    => __('Main Body Background Image','meanthemes'),
						                    'settings' => 'image_body_bg',
																'description' => __( 'Something around 2000x1500px will be ideal.' ,'meanthemes' ),
						                    'section'  => 'image_options'
						                )
						            )
						        );



						//
						// Text Options


             $wp_customize->add_section(
             	    'text_settings',
             	    array(
             	        'title' => __('Custom Text','meanthemes'),
             	        'priority' => 71,
             	    )
             	);





				        $wp_customize->add_setting(
				            'text_logo_alt',
				            array(
				                'default'   => __('Logo Alt','meanthemes'),
				                'sanitize_callback' => 'esc_html',

				            )
				        );

				        $wp_customize->add_control(
				            'text_logo_alt',
				            array(
				                'section'  => 'text_settings',
				                'label'    => __('Logo Alt Text','meanthemes'),
				                'type'     => 'text',
				                'priority' => 5
				            )
				        );


				        $wp_customize->add_setting(
				            'text_logo_title',
				            array(
				                'default'   => __('Logo Title','meanthemes'),
				                'sanitize_callback' => 'esc_html',

				            )
				        );

				        $wp_customize->add_control(
				            'text_logo_title',
				            array(
				                'section'  => 'text_settings',
				                'label'    => __('Logo Title Text','meanthemes'),
				                'type'     => 'text',
				                'priority' => 6
				            )
				        );

								$wp_customize->add_setting(
										'text_404_title',
										array(
												'default'   => __('404','meanthemes'),
												'sanitize_callback' => 'esc_html',

										)
								);

								$wp_customize->add_control(
										'text_404_title',
										array(
												'section'  => 'text_settings',
												'label'    => __('404 Page Title','meanthemes'),
												'type'     => 'text',
												'priority' => 7
										)
								);

								$wp_customize->add_setting(
										'text_404_content',
										array(
												'default'   => __('Sorry we cannot find that page, why not use the search below.','meanthemes'),
												'sanitize_callback' => 'esc_html',

										)
								);

								$wp_customize->add_control(
										'text_404_content',
										array(
												'section'  => 'text_settings',
												'label'    => __('404 Page Content','meanthemes'),
												'type'     => 'text',
												'priority' => 7
										)
								);


								$wp_customize->add_setting(
										'content_related',
										array(
												'default'   => __('Related','meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_related',
										array(
												'section'  => 'text_settings',
												'label'    => __('"Related" Text','meanthemes'),
												'type'     => 'text',
												'priority' => 10
										)
								);




								$wp_customize->add_setting(
										'content_posts_by',
										array(
												'default'   => __( 'Post by' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_posts_by',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Post by " Text on blog', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 12
										)
								);

								$wp_customize->add_setting(
										'content_event_time',
										array(
												'default'   => __( 'Taking place on' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_event_time',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Taking place on" Text on event page', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 13
										)
								);

								$wp_customize->add_setting(
										'content_event_time_past',
										array(
												'default'   => __( 'Took place on' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_event_time_past',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Took place on" Text on event page', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 13
										)
								);

								$wp_customize->add_setting(
										'content_event_title_past',
										array(
												'default'   => __( 'Past Events' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_event_title_past',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Past Events" Text on events archive page', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 13
										)
								);

								$wp_customize->add_setting(
										'content_event_title_future',
										array(
												'default'   => __( 'Upcoming Events' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_event_title_future',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Upcoming Events" Text on events archive page', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 13
										)
								);





								$wp_customize->add_setting(
										'content_more',
										array(
												'default'   => __( 'More about' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_more',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"More about" Text on team pages', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 15
										)
								);

								$wp_customize->add_setting(
										'content_team_title',
										array(
												'default'   => __( 'Team' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_team_title',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Team" Text on team archive pages', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 16
										)
								);

								$wp_customize->add_setting(
										'content_service_title',
										array(
												'default'   => __( 'Services' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_service_title',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Services" Text on service archive pages', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 17
										)
								);

								$wp_customize->add_setting(
										'content_event_title',
										array(
												'default'   => __( 'Events' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_event_title',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"Events" Text on event archive pages', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 17
										)
								);




								$wp_customize->add_setting(
										'content_blog_title',
										array(
												'default'   => __( 'From the blog' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_blog_title',
										array(
												'section'  => 'text_settings',
												'label'    => __( 'Blog title', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 18
										)
								);

								$wp_customize->add_setting(
										'content_more',
										array(
												'default'   => __( 'More' ,'meanthemes'),
												'sanitize_callback' => 'esc_html',
										)
								);

								$wp_customize->add_control(
										'content_more',
										array(
												'section'  => 'text_settings',
												'label'    => __( '"More" text on blog items', 'meanthemes' ),
												'type'     => 'text',
												'priority' => 19
										)
								);






        //
        // CUSTOM CSS
        //
        $wp_customize->add_section(
        	    'custom_css',
        	    array(
        	        'title' => __('Custom CSS Block','meanthemes'),
        	        'priority' => 72,
        	    )
        	);

        $wp_customize->add_setting(
        	  'custom_css',
        	      array(
        	          'sanitize_callback' => 'esc_html',

        	      )
        );

        $wp_customize->add_control(
            new Text_Control_Generic( $wp_customize, 'custom_css',
                array(
                    'label' => __( 'Enter Your Custom CSS' , 'meanthemes' ),
                    'section' => 'custom_css',
                    'settings' => 'custom_css'
                )
            )
        );










}
add_action( 'customize_register', 'meanthemes_register_theme_customizer' );


// Make options change live...
function meanthemes_customizer_live_preview() {

    wp_enqueue_script(
        'meanthemes-theme-customizer',
        get_template_directory_uri() . '/framework/js/theme-customizer.js',
        array( 'jquery', 'customize-preview' ),
				MEANTHEMES_THEME_VER,
        true
    );




}
add_action( 'customize_preview_init', 'meanthemes_customizer_live_preview' );


function theme_customizer() {
    wp_enqueue_style( 'customizer', get_template_directory_uri() . '/framework/theme-customizer.css', array(), MEANTHEMES_THEME_VER, 'screen' );

		wp_enqueue_script(
				'js-customizer',
				get_template_directory_uri() . '/framework/js/customizer.js',
				array( 'jquery' ),
				MEANTHEMES_THEME_VER,
				true
		);

}

add_action( 'customize_controls_enqueue_scripts', 'theme_customizer' );



// Add CSS to theme...

function meanthemes_customizer_css() {

	/* Convert hexdec color string to rgb(a) string */

function hex2rgba($color, $opacity = false) {

	$default = 'rgb(0,0,0)';

	//Return default if no color provided
	if(empty($color))
          return $default;

	//Sanitize $color if "#" is provided
        if ($color[0] == '#' ) {
        	$color = substr( $color, 1 );
        }

        //Check if color has 6 or 3 characters and get values
        if (strlen($color) == 6) {
                $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
        } elseif ( strlen( $color ) == 3 ) {
                $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
        } else {
                return $default;
        }

        //Convert hexadec to rgb
        $rgb =  array_map('hexdec', $hex);

        //Check if opacity is set(rgba or rgb)
        if($opacity){
        	if(abs($opacity) > 1)
        		$opacity = 1.0;
        	$output = 'rgba('.implode(",",$rgb).','.$opacity.')';
        } else {
        	$output = 'rgb('.implode(",",$rgb).')';
        }

        //Return rgb(a) color string
        return $output;
}




    ?>
    <style type="text/css">

		<?php

		//Colours
		$black			            = "#000000";
		$white			            = "#ffffff";
		$default			          = "#2a3437";
		$accent      	          = "#009ae9";
		$altaccent      	      = "#ea4256";
		$accenthover    	      = "#1a2123";
		$greyline               = "#edeeee";
		$lightgrey              = "#f5f5f5";
		$secondaryaccent        = "#46c570";
		$offwhite			          = "#fafafa";
		$placeholder            = "#737171";
		$backgroundgrey         = "#ea4256";
		$altgrey                = "#96adb9";
		$altdefault             = "#233239";

			// Font Colours
			$color_default = get_theme_mod( 'color_default' );
			$color_accent = get_theme_mod( 'color_accent' );
			$color_accenthover = get_theme_mod( 'color_accenthover' );
			$color_nav_link = get_theme_mod( 'color_nav_link' );
			$color_nav_link_hover = get_theme_mod( 'color_nav_link_hover' );
			$color_over_overlays = get_theme_mod( 'color_over_overlays' );
			$color_meta = get_theme_mod( 'color_meta' );


			// Background Colors
			$bg_color_body = get_theme_mod( 'bg_color_body' );
			$bg_color_wrap = get_theme_mod( 'bg_color_wrap' );
			$bg_color_post = get_theme_mod( 'bg_color_post' );
			$bg_color_header = get_theme_mod( 'bg_color_header' );
			$bg_color_grey = get_theme_mod( 'bg_color_grey' );
			$bg_color_service = get_theme_mod( 'bg_color_service' );
			$bg_color_contact_header = get_theme_mod( 'bg_color_contact_header' );
			$bg_color_footer = get_theme_mod( 'bg_color_footer' );
			$bg_color_cat = get_theme_mod( 'bg_color_cat' );
			$bg_color_tag = get_theme_mod( 'bg_color_tag' );
			$bg_color_h1 = get_theme_mod( 'bg_color_h1' );
			$bg_color_h2 = get_theme_mod( 'bg_color_h2' );
			$bg_color_post_mobile_menu = get_theme_mod( 'bg_color_post_mobile_menu' );




		?>

		<?php
		if ( $color_default !== $default && $color_default !== false ) {

			?>
			body, .site-logo, .menu-trigger, .site-logo a, .site-logo a:hover, .service-item .service-content,
			.post-content a.link-icon:before {
				color: <?php echo esc_attr( $color_default ); ?>;
			}

		<?php
		}
		?>
		<?php
		if ( $color_accent !== $accent && $color_accent !== false ) {

			?>
			a,
			nav#nav ul > li.current_page_item > a,
			nav#nav ul > li.current-menu-item > a,
			nav#nav ul > li.current_page_ancestor > a,
			nav#nav ul > li.current-post-ancestor > a,
			nav#nav ul > li.current-page-ancestor > a,
			a, .meta.top a:hover {
				color: <?php echo esc_attr( $color_accent ); ?>;
			}

			.post-content blockquote {
				border-color: <?php echo esc_attr( $color_accent ); ?>;
			}

			.pagination a, button, input[type="submit"], .comment-reply-link,
			.pagination a:hover, button:hover, input[type="submit"]:hover, .comment-reply-link:hover,
			.woocommerce a.button, .woocommerce input.button, .woocommerce input[type="submit"], .woocommerce button.button, .woocommerce .submit, .woocommerce #respond input#submit, .woocommerce-page a.button, .woocommerce-page input.button, .woocommerce-page input[type="submit"], .woocommerce-page button.button, .woocommerce-page .submit, .woocommerce-page #respond input#submit,
.woocommerce a.button:hover, .woocommerce input.button:hover, .woocommerce input[type="submit"]:hover, .woocommerce button.button:hover, .woocommerce .submit:hover, .woocommerce #respond input#submit:hover, .woocommerce-page a.button:hover, .woocommerce-page input.button:hover, .woocommerce-page input[type="submit"]:hover, .woocommerce-page button.button:hover, .woocommerce-page .submit:hover, .woocommerce-page #respond input#submit:hover,
.widget_shopping_cart_content .remove {
				background-color: <?php echo esc_attr( $color_accent ); ?> !important;
			}

		<?php
		}
		?>

		<?php
		if ( $color_accenthover !== $accenthover && $color_accenthover !== false ) {

			?>

			a:hover, .team-icons .fa:hover {
				color: <?php echo esc_attr( $color_accenthover ); ?>;
			}


		<?php
		}

		if ( $color_nav_link !== $white && $color_nav_link !== false ) { ?>
			nav#nav ul > li > a,
			nav#nav ul > li.current_page_item > a,
			nav#nav ul > li.current-menu-item > a,
			nav#nav ul > li.current_page_ancestor > a,
			nav#nav ul > li.current-post-ancestor > a,
			nav#nav ul > li.current-page-ancestor > a,
			nav#nav a:hover {
				color: <?php echo esc_attr( $color_nav_link ); ?>;
			}
		<?php
		}

		if ( $color_nav_link_hover !== $white && $color_nav_link_hover !== false ) { ?>
			nav#nav ul > li > a:hover,
			nav#nav ul > li.current_page_item > a,
			nav#nav ul > li.current-menu-item > a,
			nav#nav ul > li.current_page_ancestor > a,
			nav#nav ul > li.current-post-ancestor > a,
			nav#nav ul > li.current-page-ancestor > a,
			nav#nav a:hover {
				color: <?php echo esc_attr( $color_nav_link_hover ); ?>;
			}
		<?php
		}
		?>

		<?php


		if ( $color_over_overlays !== $white && $color_over_overlays !== false ) { ?>
			.header, .header #nav a, .header #nav a:hover, .home-hero, .home-hero a,
			.main-footer, .main-footer a, .main-footer a:hover,
			.meta li.cat a, .meta li.cat a:hover,
			.home-widget.widget-services,
			.contact-header, .contact-header a, .contact-header a:hover,
			.error404 .image-present,
			.post-image-holder, .post-image-holder a:hover,
			.slider-inner {
				color: <?php echo esc_attr( $color_over_overlays ); ?>;
			}
		<?php
		}
		?>

		<?php


		if ( $color_meta !== $altgrey && $color_meta !== false ) { ?>
			.blog-item a time, .blog-item a h3, .meta.top, .meta.top a, .meta.top {
				color: <?php echo esc_attr( $color_meta ); ?>;
			}
		<?php
		}
		?>



		<?php
		if ( $bg_color_body !== $altaccent && $bg_color_body !== false ) {

			?>
		  html {
				background-color: <?php echo esc_attr( $bg_color_body ); ?>;
			}

		<?php
		}
		?>

		<?php
		if ( $bg_color_wrap !== $white && $bg_color_wrap !== false ) {

			?>
			#main-wrap {
				background-color: <?php echo esc_attr( $bg_color_wrap ); ?>;
			}

		<?php
		}
		?>

		<?php
		if ( $bg_color_post !== $white && $bg_color_post !== false ) {

			?>
			.post-content {
				background-color: <?php echo esc_attr( $bg_color_post ); ?>;
			}
		<?php
		}
		?>
		<?php
		if ( $bg_color_header !== $default && $bg_color_header !== false ) {

			?>
			.header nav#nav,
			.header nav#nav ul li:hover ul {
				background-color: <?php echo esc_attr( $bg_color_header ); ?>;
			}


			<?php } ?>
			<?php
			if ( $bg_color_grey !== $lightgrey && $bg_color_grey !== false ) {

				?>
				.home-widget.widget_products, .loop, .related-posts, .home-widget.widget-team,
				.woocommerce .woocommerce-message, .woocommerce .woocommerce-info,
				.woocommerce .woocommerce-error, .woocommerce .woocommerce-message,
				.woocommerce .woocommerce-info, .woocommerce .woocommerce-error,
				.woocommerce #payment,
				.woocommerce ul.products,
				.woocommerce .upsells.products, .woocommerce .related.products {
					background-color: <?php echo esc_attr( $bg_color_grey ); ?>;
				}
				.pagination.post-pagination, .footer-widgets {
				  border-color: <?php echo esc_attr( $bg_color_grey ); ?>;
				}
			<?php
			}
			?>

			<?php
			if ( $bg_color_service !== $accent && $bg_color_service !== false ) {

				?>
				.home-widget.widget-services {
					background-color: <?php echo esc_attr( $bg_color_service ); ?>;
				}
			<?php
			}
			?>

			<?php
			if ( $bg_color_contact_header !== $altaccent && $bg_color_contact_header !== false ) {

				?>
				.contact-header {
					background-color: <?php echo esc_attr( $bg_color_contact_header ); ?> !important;
				}
			<?php
			}
			?>
			<?php
			if ( $bg_color_footer !== $altaccent && $bg_color_footer !== false ) {

				?>
				.main-footer {
					background-color: <?php echo esc_attr( $bg_color_footer ); ?>;
				}
			<?php
			}
			?>
			<?php
			if ( $bg_color_cat !== $altaccent && $bg_color_cat !== false ) {

				?>
				.meta li.cat a,
				.meta li.cat.tag a:hover,
				.blog-item .featured.future
				 {
					background-color: <?php echo esc_attr( $bg_color_cat ); ?>;
				}

				.woocommerce span.onsale, .woocommerce-page span.onsale {
					background-color: <?php echo esc_attr( $bg_color_cat ); ?>;
					}
					.woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error, .woocommerce .woocommerce-message, .woocommerce .woocommerce-info, .woocommerce .woocommerce-error, .woocommerce-page .woocommerce-message, .woocommerce-page .woocommerce-info, .woocommerce-page .woocommerce-error, .woocommerce-page .woocommerce-message, .woocommerce-page .woocommerce-info, .woocommerce-page .woocommerce-error {
					border-color:  <?php echo esc_attr( $bg_color_cat ); ?>;
					}
					.woocommerce .woocommerce-message:before, .woocommerce .woocommerce-info:before, .woocommerce .woocommerce-error:before, .woocommerce .woocommerce-message:before, .woocommerce .woocommerce-info:before, .woocommerce .woocommerce-error:before, .woocommerce-page .woocommerce-message:before, .woocommerce-page .woocommerce-info:before, .woocommerce-page .woocommerce-error:before, .woocommerce-page .woocommerce-message:before, .woocommerce-page .woocommerce-info:before, .woocommerce-page .woocommerce-error:before,
					.woocommerce .added_to_cart, .woocommerce .amount, .woocommerce-page .added_to_cart, .woocommerce-page .amount {
					color:  <?php echo esc_attr( $bg_color_cat ); ?>;
					}

			<?php
			}
			?>
			<?php
			if ( $bg_color_tag !== $altgrey && $bg_color_tag !== false ) {

				?>
				.meta li.cat a:hover,
				.meta li.cat.tag a {
					background-color: <?php echo esc_attr( $bg_color_tag ); ?>;
				}
			<?php
			}
			?>
			<?php
			if ( $bg_color_h1 !== $accent && $bg_color_h1 !== false ) {

				// Work out RGBA.
				$color = $bg_color_h1;
				$rgb = hex2rgba($color);
				$rgba = hex2rgba($color, 0.95);

				?>
				.page .has-post-thumbnail .post-image-holder .post-head h1, .single .has-post-thumbnail .post-image-holder .post-head h1,
			  .home-widget.widget-sliders .owl-carousel .slider-item .slider-inner h2 {
					background-color: <?php echo esc_attr( $bg_color_h1 ); ?>;
				}
				.page .has-post-thumbnail .post-image-holder .post-head h1, .single .has-post-thumbnail .post-image-holder .post-head h1,
				.home-widget.widget-sliders .owl-carousel .slider-item .slider-inner h2 {
					background-color: <?php echo esc_attr( $rgba ); ?>;
				}
			<?php
			}
			?>
			<?php
			if ( $bg_color_h2 !== $accent && $bg_color_h2 !== false ) {

				// Work out RGBA.
				$color = $bg_color_h2;
				$rgb = hex2rgba($color);
				$rgba = hex2rgba($color, 0.85);

				?>
				.page .has-post-thumbnail .post-image-holder .post-head h1 + h2, .page .has-post-thumbnail .post-image-holder .post-head .team-icons, .single .has-post-thumbnail .post-image-holder .post-head h1 + h2,
				.home-widget.widget-sliders .owl-carousel .slider-item .slider-inner h2 + .slider-content {
					background-color: <?php echo esc_attr( $bg_color_h2 ); ?>;
				}
				.page .has-post-thumbnail .post-image-holder .post-head h1 + h2, .page .has-post-thumbnail .post-image-holder .post-head .team-icons, .single .has-post-thumbnail .post-image-holder .post-head h1 + h2,
				.home-widget.widget-sliders .owl-carousel .slider-item .slider-inner h2 + .slider-content {
					background-color: <?php echo esc_attr( $rgba ); ?>;
				}
			<?php
			}
			?>

			<?php
			if ( $bg_color_post_mobile_menu !== $altaccent && $bg_color_post_mobile_menu !== false ) {

				?>
				.mean-container .mean-bar,
				.mean-container .mean-nav {
					background-color: <?php echo esc_attr( $bg_color_post_mobile_menu ); ?>;
				}
			<?php
			}
			?>



    <?php $font_main = get_theme_mod( 'font_main' );

    if ( $font_main !== "Karla" && $font_main !== false ) {

     ?>
        body, input[type="text"], input[type="email"], input[type="tel"],
				input[type="url"], input[type="password"], textarea,
				input[type="submit"] {
        	font-family: <?php echo esc_attr( $font_main ); ?>;
        }

    <?php } ?>
    <?php $font_headings = get_theme_mod( 'font_headings' );

    if ( $font_headings !== "Special Elite" && $font_headings !== false ) {

     ?>
		h1, h2, h3,
		h4, h5, h6,
		.site-title,
		.site-tagline,
		#nav, time, .pagination, .btn, button, input[type="submit"], .button, .contact-header,
		.main-footer .footer-motivation, .main-footer .footer-contact, .main-footer .footer-copyright,
		.home-widget.woocommerce ul.product_list_widget li *,
		.instagrams,
		.home-widget.widget-testimonials blockquote, blockquote, .time,
		.woocommerce #review_form #respond .form-submit input {
        	font-family: <?php echo esc_attr( $font_headings ); ?>;
        }
    <?php } ?>
		<?php $font_blockquote = get_theme_mod( 'font_blockquote' );

    if ( $font_blockquote !== "Special Elite" && $font_blockquote !== false ) {

     ?>
		.home-widget.widget-testimonials blockquote, blockquote {
			font-family: <?php echo esc_attr( $font_headings ); ?>;
		}
		<?php } ?>

    <?php $font_advanced_service_main = get_theme_mod( 'font_advanced_service_main' );

    if ( $font_advanced_service_main && $font_advanced_service_main !== false ) {

     ?>
		body, input[type="text"], input[type="email"], input[type="tel"],
		input[type="url"], input[type="password"], textarea,
		input[type="submit"] {
        	font-family: <?php echo esc_attr( $font_advanced_service_main ); ?>;
        	font-weight: <?php echo esc_attr( get_theme_mod( 'font_advanced_service_main_weight' ) ); ?>;
        }
    <?php } ?>
    <?php $font_advanced_service_headings = get_theme_mod( 'font_advanced_service_headings' );

    if ( $font_advanced_service_headings && $font_advanced_service_headings !== false ) {

     ?>
		h1, h2, h3,
		h4, h5, h6,
		.site-title,
		.site-tagline,
		#nav, time, .pagination, .btn, button, input[type="submit"], .button, .contact-header,
		.main-footer .footer-motivation, .main-footer .footer-contact, .main-footer .footer-copyright,
		.home-widget.woocommerce ul.product_list_widget li *,
		.instagrams,
		.home-widget.widget-testimonials blockquote, blockquote, .time,
		.woocommerce #review_form #respond .form-submit input {
        	font-family: <?php echo esc_attr( $font_advanced_service_headings ); ?>;
        	<?php
        	$font_advanced_service_heading_oblique = get_theme_mod( 'font_advanced_service_heading_oblique' );

        	if ( $font_advanced_service_heading_oblique ) {

        	?>
        	font-style: oblique;
        	<?php } else { ?>
        	font-style: normal;
        	<?php } ?>

					h1, h2, h3, h4, h5, h6 {
						font-weight: <?php echo esc_attr( get_theme_mod( 'font_advanced_service_heading_weight' ) ); ?>;
					}

        }
    <?php } ?>
<?php

	// Font Sizes

	$font_size_body = get_theme_mod( 'font_size_body' );
	$font_size_h1 = get_theme_mod( 'font_size_h1' );
	$font_size_h2 = get_theme_mod( 'font_size_h2' );
	$font_size_h3 = get_theme_mod( 'font_size_h3' );
	$font_size_h4 = get_theme_mod( 'font_size_h4' );
	$font_size_h5 = get_theme_mod( 'font_size_h5' );
	$font_size_h6 = get_theme_mod( 'font_size_h6' );
	$meta = get_theme_mod( 'meta' );
	$font_size_site_title = get_theme_mod( 'font_size_site_title' );


	$font_uppercase = get_theme_mod( 'font_uppercase' );



	if ( $font_size_body !== "16" && $font_size_body !== false ) {

	?>
		#main-wrap { font-size: <?php echo esc_attr( $font_size_body ); ?>px; font-size: <?php echo esc_attr( ($font_size_body/10) ); ?>rem; }
	<?php

		}

	?>


	<?php

	if ( $font_size_h1 !== "48" && $font_size_h1 !== false ) {

	?>
		h1 { font-size: <?php echo esc_attr( $font_size_h1 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h1/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_h2 !== "38" && $font_size_h2 !== false ) {

	?>
	h2, .entry-summary h1 { font-size: <?php echo esc_attr( $font_size_h2 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h2/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_h3 !== "32" && $font_size_h3 !== false ) {

	?>
		h3 { font-size: <?php echo esc_attr( $font_size_h3 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h3/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_h4 !== "26" && $font_size_h4 !== false ) {

	?>
		h4 { font-size: <?php echo esc_attr( $font_size_h4 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h4/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_h5 !== "22" && $font_size_h5 !== false ) {

	?>
	h5, .footer-motivation { font-size: <?php echo esc_attr( $font_size_h5 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h5/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_h6 !== "20" && $font_size_h6 !== false ) {

	?>
	h6, .tagline, .home-hero h2 { font-size: <?php echo esc_attr( $font_size_h6 ); ?>px; font-size: <?php echo esc_attr( ($font_size_h6/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $meta !== "14" && $meta !== false ) {

	?>
	.meta li.cat { font-size: <?php echo esc_attr( $meta ); ?>px; font-size: <?php echo esc_attr( ($meta/10) ); ?>rem; }
	<?php

		}

	?>
	<?php

	if ( $font_size_site_title !== "48" && $font_size_site_title !== false ) {

	?>
		.site-title { font-size: <?php echo esc_attr( $font_size_site_title ); ?>px; font-size: <?php echo esc_attr( ($font_size_site_title/10) ); ?>rem; }
	<?php

		}

	?>



	<?php if ( $font_uppercase === "1" ) { ?>
	/* Text transforms */
	.site-title,
	h1, h2, h3,
	h4, h5, h6 {
		text-transform: uppercase;
	}
<?php } ?>


<?php
$header_background_image = get_theme_mod( 'header_background_image' );
if ( $header_background_image ) { ?>
	.header { background-image: url(<?php echo esc_url( $header_background_image ); ?>); }
<?php } ?>
<?php
$header_height = get_theme_mod( 'header_height' );
if ( $header_height ) { ?>
	.header .site-logo { height: <?php echo esc_html( $header_height ); ?>; }
<?php } ?>
<?php
$image_body_bg = get_theme_mod( 'image_body_bg' );
if ( $image_body_bg ) { ?>
	html { background-image: url(<?php echo esc_url( $image_body_bg ); ?>); }
<?php } ?>


    <?php
    // Custom CSS
    $raw_content = esc_attr( get_theme_mod( 'custom_css', '' ) );

		$content     = wp_kses( $raw_content, array( '\'', '\"' ) ); // Validate content
		$content     = str_replace( '&gt;', '>', $content ); // Greater than conversion
		$content     = str_replace( '&#039;', "'", $content ); // Single quote conversion
		$content     = str_replace( '&quot;', '"', $content ); // Double quote conversion
		echo $content;

    ?>
    </style>
    <?php
}
add_action( 'wp_head', 'meanthemes_customizer_css' );

?>