<?php
/**
 * Default theme options.
 *
 * @package Prime Interior Designer
 */

if ( ! function_exists( 'prime_interior_designer_get_default_theme_options' ) ) :

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

	$prime_interior_designer_defaults = array();

	// Top Bar
	$prime_interior_designer_defaults['show_header_contact_info'] 		= true;
	$prime_interior_designer_defaults['header_discount_text'] 		= 'FREE HEAVY SHIPPING ON ORDERS OVER $200';
    $prime_interior_designer_defaults['show_header_button_info'] 		= true;

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

	// Slider Section
	$prime_interior_designer_defaults['enable_featured_slider_section']		    	= true;
	$prime_interior_designer_defaults['featured_slider_content_type']		    	= 'featured_slider_page';
	$prime_interior_designer_defaults['featured_slider_readmore_text']	= esc_html__('ALL CANVAS VYBES','prime-interior-designer');
	$prime_interior_designer_defaults['data_slick_speed']					    	= 1000;
	$prime_interior_designer_defaults['data_slick_infinite']				    	= 1;
	$prime_interior_designer_defaults['data_slick_arrows']					    	= 1;
	$prime_interior_designer_defaults['data_slick_autoplay']				    	= 0;
	$prime_interior_designer_defaults['data_slick_draggable']				    	= 1;
	$prime_interior_designer_defaults['data_slick_fade']					    	= 1;
	$prime_interior_designer_defaults['number_of_featured_slider_items']	    	= 3;
	
	// Servies Section	
	$prime_interior_designer_defaults['enable_featured_services_section']			= true;
	$prime_interior_designer_defaults['featured_services_section_title'] = esc_html__( 'Shop By Top Category', 'prime-interior-designer' );

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

	// General Setting
	$prime_interior_designer_defaults['header_donate_scroll_to_top']			= esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['header_donate_preloader_setting']		= false;
	$prime_interior_designer_defaults['prime_interior_designer_sticky_header']	= false;

	// wooocommerce Setting
	$prime_interior_designer_defaults['prime_interior_designer_archive_product_per_row']	    = '4';
	$prime_interior_designer_defaults['prime_interior_designer_archive_product_per_page']	    = '12';

	// Single Post Setting
	$prime_interior_designer_defaults['prime_interior_designer_post_author_setting']			= esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_date_setting']				= esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_categories_setting']		= esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_comment_setting']		    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_single_page_pagination_setting']	    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_single_page_content_setting']	    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_single_tags_setting']	    		= esc_html__('true','prime-interior-designer');

	// Post Setting
	$prime_interior_designer_defaults['prime_interior_designer_post_feature_image_setting']	    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_title_setting']				= esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_meta_setting']		        = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_content_setting']		    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_post_button_setting']		    = esc_html__('true','prime-interior-designer');
	

	//Footer section
	$prime_interior_designer_defaults['copyright_text']	= esc_html__( 'Interior Design WordPress Theme', 'prime-interior-designer' );
	$prime_interior_designer_defaults['prime_interior_designer_footer_widgtes_setting']	    = esc_html__('true','prime-interior-designer');
	$prime_interior_designer_defaults['prime_interior_designer_footer_setting']		= esc_html__('true','prime-interior-designer');

	// Pass through filter.
	$prime_interior_designer_defaults = apply_filters( 'prime_interior_designer_filter_default_theme_options', $prime_interior_designer_defaults );
	return $prime_interior_designer_defaults;
}

endif;

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

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

		$prime_interior_designer_default_options = prime_interior_designer_get_default_theme_options();
		if ( empty( $key ) ) {
			return;
		}

		$prime_interior_designer_theme_options = (array)get_theme_mod( 'theme_options' );
		$prime_interior_designer_theme_options = wp_parse_args( $prime_interior_designer_theme_options, $prime_interior_designer_default_options );

		$value = null;

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

		return $value;

	}

endif;