<?php
/**
 * Extend default customizer section.
 *
 * @package leatherhouse
 *
 * @see     WP_Customize_Section
 * @access  public
 */

//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/webfont.php';
//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/controls/code/customize-typography-control.php';
//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/controls/code/customize-plugin-control.php';
//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/controls/code/customize-category-control.php';
//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/customizer-repeater/functions.php';
//require LEATHERHOUSE_PARENT_URI . '/inc/customizer/upgrade-to-pro.php';
// Theme check
$activate_theme_data = wp_get_theme(); // getting current theme data.
$activate_theme      = $activate_theme_data->name;

if ( 'Leather House' == $activate_theme ) {	
	// Frontpage Customizer Settings.
	require get_template_directory() . '/inc/customizer/frontpage-settings/frontpage-customizer-options.php';
	require get_template_directory() . '/inc/customizer/frontpage-settings/customizer-default.php';
} elseif ( 'Modern House' == $activate_theme ) {
	// Modern House Frontpage Customizer Settings.
	require get_template_directory() . '/inc/customizer/frontpage-settings/MH-frontpage-customizer-options.php';
	require get_template_directory() . '/inc/customizer/frontpage-settings/customizer-default.php';
} elseif ( 'NewsCraft' == $activate_theme ) {	
	// Frontpage Customizer Settings.
	require get_template_directory() . '/inc/customizer/frontpage-settings/NC-frontpage-customizer-options.php';
	require get_template_directory() . '/inc/customizer/frontpage-settings/customizer-default.php';
}

function leatherhouse_customizer_theme_settings( $wp_customize ){

	$active_callback   = isset( $array['active_callback'] ) ? $array['active_callback'] : null;
	$selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';

	// Site Title.
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';

	/* ALL Theme Optons Settings */
		// Top Bar Settings.
		//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/top-bar-customizer.php');	
		// Menu Settings.
		//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/menu-customizer.php');	
		// Footer Settings.
		//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/footer-customizer.php');
		// Excerpt Options.
		//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/excerpt-customizer.php');
	/* ALL Theme Optons Settings */

	/* Typography Settings */
	//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/typography-customizer.php');
	/* Colors Settings */
	//require( LEATHERHOUSE_PARENT_URI . '/inc/customizer/theme-options/colors-customizer.php');
}
add_action( 'customize_register', 'leatherhouse_customizer_theme_settings' );

//add_action( 'customize_register', 'leatherhouse_recommended_plugin_section' );

//recommended plugin section function.
/* function leatherhouse_recommended_plugin_section( $manager ) {
	// Register custom section types.
	$manager->register_section_type( 'leatherhouse_Customize_Recommended_Plugin_Section' );
	// Register sections.
	$manager->add_section(
		new leatherhouse_Customize_Recommended_Plugin_Section(
			$manager,
			'leatherhouse_upgrade_to_pro_option',
			array(
				'title'       => esc_html__( 'Ready for more?', 'leather-house' ),
				'priority'    => 500,
				'plugin_text' => esc_html__( 'Upgrade To Pro', 'leather-house' ),
				'plugin_url'  => 'https://wpfrank.com/wordpress-themes/leather-house-premium/',
			)
		)
	);
} */