<?php
/**
 * Default theme options.
 *
 * @package Prime Charity Trust
 */

if ( ! function_exists( 'prime_charity_trust_get_default_theme_options' ) ) :

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

	$prime_charity_trust_defaults = array();

	// Top Bar
	$prime_charity_trust_defaults['prime_charity_trust_tagline_setting'] 		= false;
	$prime_charity_trust_defaults['show_header_contact_info'] 		= true;
    $prime_charity_trust_defaults['show_header_social_links'] 		= true;
    $prime_charity_trust_defaults['header_social_links']			= array();

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

	// Slider Section	
	$prime_charity_trust_defaults['enable_featured_slider_section']		    	= true;
	$prime_charity_trust_defaults['featured_slider_content_type']		    	= 'featured_slider_page';
	$prime_charity_trust_defaults['featured_slider_readmore_text_setting']	    = true;
	$prime_charity_trust_defaults['featured_slider_readmore_text']	= esc_html__('Know More','prime-charity-trust');
	$prime_charity_trust_defaults['data_slick_speed']					    	= 1000;
	$prime_charity_trust_defaults['data_slick_infinite']				    	= 1;
	$prime_charity_trust_defaults['data_slick_arrows']					    	= 1;
	$prime_charity_trust_defaults['data_slick_autoplay']				    	= 0;
	$prime_charity_trust_defaults['data_slick_draggable']				    	= 1;
	$prime_charity_trust_defaults['data_slick_fade']					    	= 1;
	$prime_charity_trust_defaults['number_of_featured_slider_items']	    	= 3;
	
	// Servies Section	
	$prime_charity_trust_defaults['enable_featured_services_section']			= true;
	$prime_charity_trust_defaults['number_of_featured_services_items']			= 6;
	$prime_charity_trust_defaults['featured_services_section_title'] = esc_html__( 'Organization Cause', 'prime-charity-trust' );

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

	//General Setting
	$prime_charity_trust_defaults['header_donate_scroll_to_top']			= esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['header_donate_preloader_setting']	    = false;
	$prime_charity_trust_defaults['prime_charity_trust_sticky_header']	    = false;

    
    // wooocommerce Setting
	$prime_charity_trust_defaults['prime_charity_trust_archive_product_per_row']	    = '4';
	$prime_charity_trust_defaults['prime_charity_trust_archive_product_per_page']	    = '12';

	// Single Post Setting
	$prime_charity_trust_defaults['prime_charity_trust_post_author_setting']	   			= esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_date_setting']	       			= esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_categories_setting']			= esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_comment_setting']	    		= esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_single_page_pagination_setting']	    = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_single_page_content_setting']	    = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_single_tags_setting']	    		= esc_html__('true','prime-charity-trust');

	//Post Setting
	$prime_charity_trust_defaults['prime_charity_trust_post_feature_image_setting'] = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_title_setting']         = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_meta_setting']          = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_content_setting']       = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_post_button_setting']        = esc_html__('true','prime-charity-trust');
	
	

	//Footer section 		
	$prime_charity_trust_defaults['copyright_text']	= esc_html__( 'Charity WordPress Theme', 'prime-charity-trust' );
	$prime_charity_trust_defaults['prime_charity_trust_footer_widgtes_setting']	    = esc_html__('true','prime-charity-trust');
	$prime_charity_trust_defaults['prime_charity_trust_footer_setting']	    = esc_html__('true','prime-charity-trust');
	

	// Pass through filter.
	$prime_charity_trust_defaults = apply_filters( 'prime_charity_trust_filter_default_theme_options', $prime_charity_trust_defaults );
	return $prime_charity_trust_defaults;
}

endif;

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

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

		$prime_charity_trust_default_options = prime_charity_trust_get_default_theme_options();
		if ( empty( $key ) ) {
			return;
		}

		$prime_charity_trust_theme_options = (array)get_theme_mod( 'theme_options' );
		$prime_charity_trust_theme_options = wp_parse_args( $prime_charity_trust_theme_options, $prime_charity_trust_default_options );

		$value = null;

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

		return $value;

	}

endif;