<?php
/**
 * Default theme options.
 *
 * @package Prime Spa Center
 */

if ( ! function_exists( 'prime_spa_center_get_default_theme_options' ) ) :

	/**
	 * Get default theme options.
	 *
	 * @since 1.0.0
	 *
	 * @return array Default theme options.
	 */
function prime_spa_center_get_default_theme_options() {

	$prime_spa_center_defaults = array();

	// Top Bar
    $prime_spa_center_defaults['show_header_social_links'] 		= true;
    $prime_spa_center_defaults['header_social_links']			= array();

    // Front Page Content
	$prime_spa_center_defaults['enable_frontpage_content'] 		= true;

	// Slider Section	
	$prime_spa_center_defaults['enable_featured_slider_section']		    	= true;
	$prime_spa_center_defaults['featured_slider_content_type']		    	= 'featured_slider_page';
	$prime_spa_center_defaults['featured_slider_readmore_text']	= esc_html__('Know More','prime-spa-center');
	$prime_spa_center_defaults['data_slick_speed']					    	= 1000;
	$prime_spa_center_defaults['data_slick_infinite']				    	= 1;
	$prime_spa_center_defaults['data_slick_arrows']					    	= 1;
	$prime_spa_center_defaults['data_slick_autoplay']				    	= 0;
	$prime_spa_center_defaults['data_slick_draggable']				    	= 1;
	$prime_spa_center_defaults['data_slick_fade']					    	= 1;
	$prime_spa_center_defaults['number_of_featured_slider_items']	    	= 2;
	
	// Servies Section	
	$prime_spa_center_defaults['enable_featured_services_section']			= true;
	$prime_spa_center_defaults['featured_services_section_title'] = esc_html__( 'About Us', 'prime-spa-center' );

	// Theme Options
	$prime_spa_center_defaults['show_header_image']		    			= 'header-image-enable';
	$prime_spa_center_defaults['show_page_title']		    			= 'page-title-enable';
	$prime_spa_center_defaults['excerpt_length']							= 25;
	$prime_spa_center_defaults['readmore_text']							= esc_html__('Know More','prime-spa-center');
	$prime_spa_center_defaults['your_latest_posts_title']				= esc_html__('Blog','prime-spa-center');

	// General Setting
	$prime_spa_center_defaults['header_donate_scroll_to_top']			= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['header_donate_preloader_setting']		= false;
	$prime_spa_center_defaults['prime_spa_center_sticky_header']		= false;

	// wooocommerce Setting
	$prime_spa_center_defaults['prime_spa_center_archive_product_per_row']	    = '4';
	$prime_spa_center_defaults['prime_spa_center_archive_product_per_page']	    = '12';

	// Single Post Setting
	$prime_spa_center_defaults['prime_spa_center_post_author_setting']			= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_post_date_setting']				= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_post_categories_setting']		= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_post_comment_setting']	     	= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_single_page_pagination_setting']	    = esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_single_page_content_setting']	    = esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_single_tags_setting']	    		= esc_html__('true','prime-spa-center');

	// Post Setting
	$prime_spa_center_defaults['prime_spa_center_post_feature_image_setting']    = esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_post_title_setting']			= esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_post_meta_setting']		        = esc_html__('true','prime-spa-center');
    $prime_spa_center_defaults['prime_spa_center_post_content_setting']		    = esc_html__('true','prime-spa-center');
    $prime_spa_center_defaults['prime_spa_center_post_button_setting']		    = esc_html__('true','prime-spa-center');
   
	//Footer section 		
	$prime_spa_center_defaults['copyright_text']	= esc_html__( 'Spa WordPress Theme', 'prime-spa-center' );
	$prime_spa_center_defaults['prime_spa_center_footer_widgtes_setting']	    = esc_html__('true','prime-spa-center');
	$prime_spa_center_defaults['prime_spa_center_footer_setting']		= esc_html__('true','prime-spa-center');

	// Pass through filter.
	$prime_spa_center_defaults = apply_filters( 'prime_spa_center_filter_default_theme_options', $prime_spa_center_defaults );
	return $prime_spa_center_defaults;
}

endif;

/**
*  Get theme options
*/
if ( ! function_exists( 'prime_spa_center_get_option' ) ) :

	/**
	 * Get theme option
	 *
	 * @since 1.0.0
	 *
	 * @param string $key Option key.
	 * @return mixed Option value.
	 */
	function prime_spa_center_get_option( $key ) {

		$default_options = prime_spa_center_get_default_theme_options();
		if ( empty( $key ) ) {
			return;
		}

		$theme_options = (array)get_theme_mod( 'theme_options' );
		$theme_options = wp_parse_args( $theme_options, $default_options );

		$value = null;

		if ( isset( $theme_options[ $key ] ) ) {
			$value = $theme_options[ $key ];
		}

		return $value;

	}

endif;