<?php
/**
 * Default options for Customizer
 *
 * @package WordPress
 * @subpackage Brimstone
 * @since 1.01
 * @author Chris Baldelomar <chris@webplantmedia.com>
 * @copyright Copyright (c) 2018, Chris Baldelomar
 * @link https://webplantmedia.com/product/brimstone-wordpress-theme/
 * @license http://www.gnu.org/licenses/gpl-2.0.html
 */

// Store user defined options.
$brimstone = array();

// Store default options.
$brimstone_default = array();

/**
 * Site Info Section in Customizer
 */

// Title & Tagline.
$brimstone_default['custom_logo_2x']         = '';
$brimstone_default['display_site_title']     = 1;
$brimstone_default['display_site_tagline']   = 0;
$brimstone_default['heading_padding_top']    = '50';
$brimstone_default['heading_padding_bottom'] = '50';

/**
 * Colors Section in Customizer
 */

// Colors.
$brimstone_default['primary_color']              = '#006e41';
$brimstone_default['primary_hover_color']        = '#35383c';
$brimstone_default['archive_background_color']   = '#f1f1f1';
$brimstone_default['archive_title_light']        = 0;
$brimstone_default['footer_background_color']    = '#35383c';
$brimstone_default['site_info_background_color'] = '#282b2e';
$brimstone_default['footer_text_light']          = 1;
$brimstone_default['link_color']                 = '#666666';
$brimstone_default['link_hover_color']           = '#885c4b';

/**
 * New Theme Options Section in Customizer
 */

// Menu.
$brimstone_default['show_menu_arrows'] = 1;
$brimstone_default['show_menu_search'] = 0;

// Site.
$brimstone_default['default_button_style']     = 'button-2';
$brimstone_default['disable_body_font']        = 0;
$brimstone_default['disable_heading_font']     = 0;
$brimstone_default['disable_accent_font']      = 0;
$brimstone_default['page_image_header_height'] = 400;
$brimstone_default['post_image_header_height'] = 600;

// Blog.
$brimstone_default['blog_display']                     = 'blog1';
$brimstone_default['archive_display']                  = 'blog1';
$brimstone_default['search_display']                   = 'blog2';
$brimstone_default['thumb_excerpt_max_height']         = 0;
$brimstone_default['thumb_grid_max_height']            = 0;
$brimstone_default['blog_single_hide_post_navigation'] = 0;

// Jetpack.
$brimstone_default['jetpack_hide_share_count'] = 0;
$brimstone_default['jetpack_scroll_credit']    = sprintf( esc_html__( 'Site crafted with care by', 'brimstone' ) . ' <a href="' . esc_url( home_url( '/' ) ) . '">' . get_bloginfo( 'name' ) . '</a>' );

// Shop.
$brimstone_default['shop_columns']                     = 2;
$brimstone_default['shop_archive_columns']             = 3;
$brimstone_default['shop_related_products_columns']    = 2;
$brimstone_default['shop_image_size']                  = 'woocommerce_single';
$brimstone_default['shop_archive_image_size']          = 'woocommerce_single';
$brimstone_default['shop_related_products_image_size'] = 'woocommerce_single';
$brimstone_default['shop_products_per_page']           = 12;
$brimstone_default['shop_image_backdrop']              = 0;
$brimstone_default['shop_hide_title']                  = 1;
$brimstone_default['shop_hide_breadcrumbs']            = 0;
$brimstone_default['shop_hide_stars']                  = 0;
$brimstone_default['shop_hide_result_count']           = 0;
$brimstone_default['shop_hide_catalog_ordering']       = 0;
$brimstone_default['shop_truncate_titles']             = 1;
$brimstone_default['shop_product_hide_stars']          = 0;
$brimstone_default['shop_product_hide_meta']           = 0;
$brimstone_default['shop_disable_gallery_zoom']        = 0;
$brimstone_default['shop_disable_gallery_lightbox']    = 0;
$brimstone_default['shop_disable_gallery_slider']      = 0;

// Display Sidebar.
$brimstone_default['display_sidebar_blog']         = 1;
$brimstone_default['display_sidebar_post']         = 1;
$brimstone_default['display_sidebar_archive']      = 1;
$brimstone_default['display_sidebar_search']       = 0;
$brimstone_default['display_sidebar_shop']         = 0;
$brimstone_default['display_sidebar_shop_archive'] = 0;
$brimstone_default['display_sidebar_attachment']   = 0;

// Labels.
$brimstone_default['mobile_menu_label'] = __( 'Menu', 'brimstone' );
$brimstone_default['read_more_label']   = __( 'Continue Reading', 'brimstone' );

// 404 Page.
$brimstone_default['404_custom_page']   = 0;
$brimstone_default['404_cover_opacity'] = 54;
$brimstone_default['404_cover_color']   = '#000000';
$brimstone_default['404_text_white']    = 1;

/**
 * Set default options
 *
 * Function wp_loaded gets called before template_redirect, so we can safely
 * set a custom $content_width.
 *
 * Also, if we call get_theme_mod any sooner, then we can't live preview.
 *
 * @since Brimstone 1.01
 *
 * @return void
 */
function brimstone_default_options() {
	global $brimstone_default;
	global $brimstone;

	foreach ( $brimstone_default as $key => $value ) {
		$brimstone[ $key ] = get_theme_mod( $key, $value );
	}
}
add_action( 'wp_loaded', 'brimstone_default_options' );
