get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
// Default Customizer Remove Section
$wp_customize->remove_section( 'header_image' );
$wp_customize->get_section('background_image' )->priority = 113;
/************************************************************************************
** Top Header Settings Options
*************************************************************************************/
$wp_customize->add_panel('buzzstore_top_header_section', array(
'capabitity' => 'edit_theme_options',
'description' => __('Change the top header settings here as you want', 'buzzstore'),
'priority' => 5,
'title' => __('Top Header Settings', 'buzzstore')
));
// Top Header General Settings Section
$wp_customize->add_section('buzzstore_top_header_general_settings', array(
'title' => __('Top Header General Settings', 'buzzstore'),
'panel' => 'buzzstore_top_header_section',
'priority' => 1,
));
$wp_customize->add_setting('buzzstore_top_header_display_options', array(
'default' => 'yes',
'priority' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_sanitize' // done
));
$wp_customize->add_control('buzzstore_top_header_display_options', array(
'type' => 'radio',
'label' => __('Enable/Disable Top Header Section','buzzstore'),
'description' => __('Choose the option as you want', 'buzzstore'),
'section' => 'buzzstore_top_header_general_settings',
'choices' => array(
'yes' => __('Enable', 'buzzstore'),
'no' => __('Disable', 'buzzstore'),
)
));
$wp_customize->add_setting('buzzstore_top_header_background_color', array(
'default' => '#333333',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_top_header_background_color', array(
'type' => 'color',
'label' => __('Top Header Background Colors','buzzstore'),
'description' => __('Select top header background color as you want', 'buzzstore'),
'section' => 'buzzstore_top_header_general_settings',
));
// Top Header Left Side Settings Section
$wp_customize->add_section('buzzstore_top_header_leftside_settings', array(
'title' => __('Top Header LeftSide Settings', 'buzzstore'),
'panel' => 'buzzstore_top_header_section',
'priority' => 2,
));
$wp_customize->add_setting('buzzstore_header_leftside_options', array(
'default' => 'quickinfo',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_header_leftside_style_sanitize' // done
));
$wp_customize->add_control('buzzstore_header_leftside_options', array(
'type' => 'radio',
'label' => __('Choose options as you want', 'buzzstore'),
'description' => __('Choose any one options as you want and enter related Information', 'buzzstore'),
'section' => 'buzzstore_top_header_leftside_settings',
'settings' => 'buzzstore_header_leftside_options',
'choices' => array(
'socialicon' => __('Social Icons','buzzstore'),
'topnavmenu' => __('Ton Nav Menu','buzzstore'),
'quickinfo' => __('Quick Information','buzzstore')
)
));
// Active Callback function for quick information
$wp_customize->add_setting('buzzstore_quick_email', array(
'default' => '',
'priority' => 3,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_text_sanitize' //done
));
$wp_customize->add_control('buzzstore_quick_email', array(
'type' => 'text',
'label' => __('Enter Email Address :', 'buzzstore'),
'section' => 'buzzstore_top_header_leftside_settings',
'settings' => 'buzzstore_quick_email',
'active_callback' => 'buzzstore_quickinfo_email_address'
));
$wp_customize->add_setting('buzzstore_quick_phone', array(
'default' => '',
'priority' => 3,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_text_sanitize' //done
));
$wp_customize->add_control('buzzstore_quick_phone', array(
'type' => 'text',
'label' => __('Enter Phone Number :', 'buzzstore'),
'section' => 'buzzstore_top_header_leftside_settings',
'settings' => 'buzzstore_quick_phone',
'active_callback' => 'buzzstore_quickinfo_email_address'
));
// Active Callback function for social icon
$wp_customize->add_setting('buzzstore_theme_social_icon', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_theme_social_icon', array(
'type' => 'checkbox',
'label' => __('Check to show the theme social icon', 'buzzstore'),
'description' => __('Check to show the theme social icon (if you want to add extra plugins icon then please put the plugins shortcode below.)', 'buzzstore'),
'section' => 'buzzstore_top_header_leftside_settings',
'settings' => 'buzzstore_theme_social_icon',
'active_callback' => 'buzzstore_social_icon_callback'
));
$wp_customize->add_setting('buzzstore_shortcode_social_icon', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_textarea;' //done
));
$wp_customize->add_control('buzzstore_shortcode_social_icon', array(
'type' => 'textarea',
'label' => __('Enter social icon shortcodes here that will show top left side', 'buzzstore'),
'section' => 'buzzstore_top_header_leftside_settings',
'settings' => 'buzzstore_shortcode_social_icon',
'active_callback' => 'buzzstore_social_icon_callback'
));
// Top Header Right Side Settings Section
$wp_customize->add_section('buzzstore_top_header_rightside_settings', array(
'title' => __('Top Header RightSide Settings', 'buzzstore'),
'panel' => 'buzzstore_top_header_section',
'priority' => 3,
));
$wp_customize->add_setting('buzzstore_display_wishlist', array(
'priority' => 1,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_display_wishlist', array(
'type' => 'checkbox',
'label' => __('Check to show the wishlist', 'buzzstore'),
'description' => __('Check to show the wishlist (Requires WooCommerce Wishlist Plugins)', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_display_wishlist'
));
$wp_customize->add_setting('buzzstore_display_myaccount_login', array(
'priority' => 2,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_display_myaccount_login', array(
'type' => 'checkbox',
'label' => __('Check to show the my account', 'buzzstore'),
'description' => __('Check to show the my account or login/register menu (Requires WooCommerce)', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_display_myaccount_login'
));
$wp_customize->add_setting('buzzstore_display_cart', array(
'priority' => 2,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_display_cart', array(
'type' => 'checkbox',
'label' => __('Check to show the cart', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_display_cart'
));
$wp_customize->add_setting('buzzstore_display_language_options', array(
'priority' => 2,
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_display_language_options', array(
'type' => 'checkbox',
'label' => __('Check to show the language', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_display_language_options'
));
$wp_customize->add_setting('buzzstore_shortcode_language', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_textarea' //done
));
$wp_customize->add_control('buzzstore_shortcode_language', array(
'type' => 'textarea',
'label' => __('Enter language shortcodes here', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_shortcode_language'
));
$wp_customize->add_setting('buzzstore_display_currency_options', array(
'priority' => 2,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_display_currency_options', array(
'type' => 'checkbox',
'label' => __('Check to show the currency', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_display_currency_options'
));
$wp_customize->add_setting('buzzstore_shortcode_currency', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_textarea' //done
));
$wp_customize->add_control('buzzstore_shortcode_currency', array(
'type' => 'textarea',
'label' => __('Enter currency shortcodes here', 'buzzstore'),
'section' => 'buzzstore_top_header_rightside_settings',
'settings' => 'buzzstore_shortcode_currency'
));
$wp_customize->add_panel('buzzstore_header_options', array(
'capabitity' => 'edit_theme_options',
'description' => __('Change the top header settings here as you want', 'buzzstore'),
'priority' => 5,
'title' => __('Main Header Settings', 'buzzstore')
));
// Search Options enable/disable
$wp_customize->add_section('buzzstore_search_section', array(
'title' => __('Search Options', 'buzzstore'),
'panel' => 'buzzstore_header_options'
));
$wp_customize->add_setting('buzzstore_search_options', array(
'priority' => 1,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_search_options', array(
'type' => 'checkbox',
'label' => __('Check to enable the Search', 'buzzstore'),
'section' => 'buzzstore_search_section',
'settings' => 'buzzstore_search_options'
));
$wp_customize->add_setting('buzzstore_search_type', array(
'default' => 'no',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_sanitize' // done
));
$wp_customize->add_control('buzzstore_search_type', array(
'type' => 'radio',
'label' => __('Choose the option that you want', 'buzzstore'),
'section' => 'buzzstore_search_section',
'choices' => array(
'yes' => __('Normal Search', 'buzzstore'),
'no' => __('Advance Search With Category', 'buzzstore'),
)
));
$wp_customize->add_setting('buzzstore_search_options_placeholder', array(
'default' => 'Product Search...',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_text_sanitize' //done
));
$wp_customize->add_control('buzzstore_search_options_placeholder', array(
'type' => 'text',
'label' => __('Enter the search box Placeholder text', 'buzzstore'),
'section' => 'buzzstore_search_section',
'settings' => 'buzzstore_search_options_placeholder'
));
// Main Header General Settings enable/disable
$wp_customize->add_section('buzzstore_main_header_general_settings', array(
'title' => __('Main Header General Settings', 'buzzstore'),
'panel' => 'buzzstore_header_options'
));
$wp_customize->add_setting('buzzstore_header_cart_menu', array(
'priority' => 2,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_header_cart_menu', array(
'type' => 'checkbox',
'label' => __('Check to show the Cart Button', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
'settings' => 'buzzstore_header_cart_menu'
));
$wp_customize->add_setting('buzzstore_home_icon_display', array(
'priority' => 3,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize', //done
'transport' => 'refresh',
));
$wp_customize->add_control('buzzstore_home_icon_display', array(
'type' => 'checkbox',
'label' => __('Check to show the home icon in the primary menu', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
'settings' => 'buzzstore_home_icon_display'
));
// primary sticky menu enable/disable
$wp_customize->add_setting('buzzstore_primary_sticky_menu', array(
'priority' => 4,
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_primary_sticky_menu', array(
'type' => 'checkbox',
'label' => __('Check to enable the sticky behavior of the primary menu', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
'settings' => 'buzzstore_primary_sticky_menu'
));
$wp_customize->add_setting('buzzstore_main_header_background_color', array(
'default' => '#ffffff',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color', // done
'transport' => 'postMessage',
));
$wp_customize->add_control('buzzstore_main_header_background_color', array(
'type' => 'color',
'label' => __('Main Header Background Colors','buzzstore'),
'description' => __('Select main header background color as you want', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
));
$wp_customize->add_setting('buzzstore_main_header_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_main_header_background_image', array(
'label' => __('Upload Header Background Image', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
'setting' => 'buzzstore_main_header_background_image'
)));
$wp_customize->add_setting('buzzstore_main_header_font_color', array(
'default' => '#000000',
'priority' =>3,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
'transport' => 'postMessage',
));
$wp_customize->add_control('buzzstore_main_header_font_color', array(
'type' => 'color',
'label' => __('Main Header Font Colors','buzzstore'),
'description' => __('Select main header fonts color as you want', 'buzzstore'),
'section' => 'buzzstore_main_header_general_settings',
));
$wp_customize->get_section('title_tagline' )->panel = 'buzzstore_header_options';
$wp_customize->get_section('title_tagline' )->priority = 0;
$wp_customize->get_section('colors' )->panel = 'buzzstore_header_options';
$wp_customize->get_section('colors' )->priority = 1;
// logo upload options
$wp_customize->add_section('buzzstore_header_logo', array(
'priority' => 1,
'title' => __('Header Logo', 'buzzstore'),
'panel' => 'buzzstore_header_options'
));
$wp_customize->add_setting('buzzstore_logo', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_logo', array(
'label' => __('Upload logo for your header', 'buzzstore'),
'section' => 'buzzstore_header_logo',
'setting' => 'buzzstore_logo'
)));
$wp_customize->add_setting('buzzstore_header_logo_placement', array(
'default' => 'header_text_only',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_show_radio_saniztize' //done
));
$wp_customize->add_control('buzzstore_header_logo_placement', array(
'type' => 'radio',
'label' => __('Choose the option that you want', 'buzzstore'),
'section' => 'buzzstore_header_logo',
'choices' => array(
'header_logo_only' => __('Header Logo Only', 'buzzstore'),
'header_text_only' => __('Header Text Only', 'buzzstore'),
'show_both' => __('Show Both', 'buzzstore'),
'disable' => __('Disable', 'buzzstore')
)));
// HomePage Icon Text Block Section
$wp_customize->add_panel('buzzstore_icon_text_block_options', array(
'capabitity' => 'edit_theme_options',
'priority' => 101,
'title' => __('Icon Text Block Settings', 'buzzstore')
));
$wp_customize->add_section('buzzstore_icon_block', array(
'priority' => 40,
'title' => __('Icon Text Block', 'buzzstore'),
'panel' => 'buzzstore_icon_text_block_options',
));
$wp_customize->add_setting('buzzstore_icon_block_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_icon_block_section', array(
'type' => 'radio',
'label' => __('Enable/Disable Icon Text Block Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_icon_block_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_icon_block_display_section', array(
'default' => 'below_slider',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_icon_block_display_sanitize',
));
$wp_customize->add_control('buzzstore_icon_block_display_section', array(
'type' => 'radio',
'label' => __('Icon Block Display Position', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_icon_block_display_section',
'choices' => array(
'below_slider' => __('Below Main Slider', 'buzzstore'),
'above_footer' => __('Above the Footer', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_first_icon_block_area', array(
'default' => 'fa-user',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
'transport' => 'postMessage'
));
$wp_customize->add_control('buzzstore_first_icon_block_area',array(
'type' => 'text',
'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'buzzstore' ), 'fa-user','','' ),
'label' => __('First Text Block Area Icon', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_first_icon_block_area',
));
$wp_customize->add_setting('buzzstore_first_title_icon_block_area', array(
'default' => '',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
'transport' => 'postMessage'
));
$wp_customize->add_control('buzzstore_first_title_icon_block_area',array(
'type' => 'text',
'label' => __('First Icon Block Title Text', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_first_title_icon_block_area',
));
$wp_customize->add_setting('buzzstore_second_icon_block_area', array(
'default' => 'fa-university',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
'transport' => 'postMessage'
));
$wp_customize->add_control('buzzstore_second_icon_block_area',array(
'type' => 'text',
'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'buzzstore' ), 'fa-university','','' ),
'label' => __('Second Text Block Area Icon', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_second_icon_block_area',
));
$wp_customize->add_setting('buzzstore_second_title_icon_block_area', array(
'default' => '',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
'transport' => 'postMessage'
));
$wp_customize->add_control('buzzstore_second_title_icon_block_area',array(
'type' => 'text',
'label' => __('Second Icon Block Title Text', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_second_title_icon_block_area',
));
$wp_customize->add_setting('buzzstore_third_icon_block_area', array(
'default' => 'fa-futbol-o',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
'transport' => 'postMessage'
));
$wp_customize->add_control('buzzstore_third_icon_block_area',array(
'type' => 'text',
'description' => sprintf( __( 'Use font awesome icon: Eg: %s. %sSee more here%s', 'buzzstore' ), 'fa-futbol-o','','' ),
'label' => __('Thired Text Block Area Icon', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_third_icon_block_area',
));
$wp_customize->add_setting('buzzstore_thired_title_icon_block_area', array(
'default' => '',
'sanitize_callback' => 'buzzstore_text_sanitize', // done
));
$wp_customize->add_control('buzzstore_thired_title_icon_block_area',array(
'type' => 'text',
'label' => __('Thired Icon Block Title Text', 'buzzstore'),
'section' => 'buzzstore_icon_block',
'setting' => 'buzzstore_thired_title_icon_block_area',
));
// Breadcrumbs Settings
$wp_customize->add_panel('buzzstore_breadcrumbs_settings', array(
'capability' => 'edit_theme_options',
'description'=> __('Manage breadcrumbs settings here as you want', 'buzzstore'),
'priority' => 102,
'title' => __('Breadcrumbs Settings', 'buzzstore')
));
$wp_customize->add_section('buzzstore_breadcrumbs_section', array(
'priority' => 1,
'title' => __('Breadcrumbs General Settings', 'buzzstore'),
'panel' => 'buzzstore_breadcrumbs_settings'
));
$wp_customize->add_setting('buzzstore_breadcrumbs_background_color', array(
'default' => '#555555',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_breadcrumbs_background_color', array(
'type' => 'color',
'label' => __('Breadcrumbs Background Colors','buzzstore'),
'description' => __('Select default breadcrumbs background color as you want', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_section',
));
$wp_customize->add_setting('buzzstore_breadcrumbs_font_color', array(
'default' => '#ffffff',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_breadcrumbs_font_color', array(
'type' => 'color',
'label' => __('Breadcrumbs Font Colors','buzzstore'),
'description' => __('Select default breadcrumbs Font color as you want', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_section',
));
$wp_customize->add_setting('buzzstore_breadcrumbs_min_height_options', array(
'default' => '300',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_sanitize_number' // done
));
$wp_customize->add_control('buzzstore_breadcrumbs_min_height_options', array(
'type' => 'number',
'label' => __('Enter Min Height For Breadcrumbs', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_section',
'settings' => 'buzzstore_breadcrumbs_min_height_options'
));
$wp_customize->add_section('buzzstore_breadcrumbs_woo_archive_section', array(
'priority' => 2,
'title' => __('WooCommerce Archive Page Settings', 'buzzstore'),
'panel' => 'buzzstore_breadcrumbs_settings'
));
$wp_customize->add_setting('buzzstore_woo_archive_breadcrumbs_option', array(
'default' => 0,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' // done
));
$wp_customize->add_control('buzzstore_woo_archive_breadcrumbs_option', array(
'type' => 'checkbox',
'label' => __('Check to Disable the Breadcrumbs Menu Only', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_archive_section',
'settings' => 'buzzstore_woo_archive_breadcrumbs_option'
));
$wp_customize->add_setting('buzzstore_woo_archive_enable_disable_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_woo_archive_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Breadcrumbs Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_archive_section',
'setting' => 'buzzstore_woo_archive_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_breadcrumbs_woo_archive_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_breadcrumbs_woo_archive_background_image', array(
'label' => __('Upload Breadcrumbs Background Image', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_archive_section',
'setting' => 'buzzstore_breadcrumbs_woo_archive_background_image'
)));
$wp_customize->add_section('buzzstore_breadcrumbs_woo_single_section', array(
'priority' => 3,
'title' => __('WooCommerce Single Page Settings', 'buzzstore'),
'panel' => 'buzzstore_breadcrumbs_settings'
));
$wp_customize->add_setting('buzzstore_woo_single_breadcrumbs_option', array(
'default' => 0,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' // done
));
$wp_customize->add_control('buzzstore_woo_single_breadcrumbs_option', array(
'type' => 'checkbox',
'label' => __('Check to Disable the Breadcrumbs Menu Only', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_single_section',
'settings' => 'buzzstore_woo_single_breadcrumbs_option'
));
$wp_customize->add_setting('buzzstore_woo_single_enable_disable_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_woo_single_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Breadcrumbs Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_single_section',
'setting' => 'buzzstore_woo_single_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_breadcrumbs_woo_single_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_breadcrumbs_woo_single_background_image', array(
'label' => __('Upload Breadcrumbs Background Image', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_woo_single_section',
'setting' => 'buzzstore_breadcrumbs_woo_single_background_image'
)));
$wp_customize->add_section('buzzstore_breadcrumbs_normal_page_section', array(
'priority' => 4,
'title' => __('Normal Page Settings', 'buzzstore'),
'panel' => 'buzzstore_breadcrumbs_settings'
));
$wp_customize->add_setting('buzzstore_normal_page_breadcrumbs_option', array(
'default' => 0,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' // done
));
$wp_customize->add_control('buzzstore_normal_page_breadcrumbs_option', array(
'type' => 'checkbox',
'label' => __('Check to Disable the Breadcrumbs Menu Only', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_normal_page_section',
'settings' => 'buzzstore_normal_page_breadcrumbs_option'
));
$wp_customize->add_setting('buzzstore_normal_page_enable_disable_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_normal_page_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Breadcrumbs Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_breadcrumbs_normal_page_section',
'setting' => 'buzzstore_normal_page_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_breadcrumbs_normal_page_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_breadcrumbs_normal_page_background_image', array(
'label' => __('Upload Breadcrumbs Background Image', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_normal_page_section',
'setting' => 'buzzstore_breadcrumbs_normal_page_background_image'
)));
$wp_customize->add_section('buzzstore_breadcrumbs_post_archive_page_section', array(
'priority' => 5,
'title' => __('Posts/Archive Page Settings', 'buzzstore'),
'panel' => 'buzzstore_breadcrumbs_settings'
));
$wp_customize->add_setting('buzzstore_post_archive_page_breadcrumbs_option', array(
'default' => 0,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' // done
));
$wp_customize->add_control('buzzstore_post_archive_page_breadcrumbs_option', array(
'type' => 'checkbox',
'label' => __('Check to Disable the Breadcrumbs Menu Only', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_post_archive_page_section',
'settings' => 'buzzstore_post_archive_page_breadcrumbs_option'
));
$wp_customize->add_setting('buzzstore_post_archive_page_enable_disable_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_post_archive_page_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Breadcrumbs Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_breadcrumbs_post_archive_page_section',
'setting' => 'buzzstore_post_archive_page_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_breadcrumbs_post_archive_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_breadcrumbs_post_archive_background_image', array(
'label' => __('Upload Breadcrumbs Background Image', 'buzzstore'),
'section' => 'buzzstore_breadcrumbs_post_archive_page_section',
'setting' => 'buzzstore_breadcrumbs_post_archive_background_image'
)));
// Start of the Design Options
$wp_customize->add_panel('buzzstore_design_options', array(
'capabitity' => 'edit_theme_options',
'description' => __('Change the Design Settings from here as you want', 'buzzstore'),
'priority' => 103,
'title' => __('Layout Options', 'buzzstore')
));
// site layout setting
$wp_customize->add_section('buzzstore_site_layout_setting', array(
'priority' => 2,
'title' => __('Webpage Layout', 'buzzstore'),
'panel' => 'buzzstore_design_options'
));
$wp_customize->add_setting('buzzstore_site_layout', array(
'default' => 'fullwidth',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_web_layout_sanitize' //done
));
$wp_customize->add_control('buzzstore_site_layout', array(
'type' => 'radio',
'label' => __('Choose the layout that you want', 'buzzstore'),
'choices' => array(
'boxed' => __('Boxed', 'buzzstore'),
'fullwidth' => __('Full Width', 'buzzstore')
),
'section' => 'buzzstore_site_layout_setting'
));
$imagepath = get_template_directory_uri() . '/images/';
// Layout for homepage only
$wp_customize->add_section('buzzstore_layout_homepage_setting', array(
'priority' => 3,
'title' => __('Layout for HomePage Only', 'buzzstore'),
'panel'=> 'buzzstore_design_options'
));
// Layout for pages only
$wp_customize->add_section('buzzstore_layout_page_setting', array(
'priority' => 4,
'title' => __('Pages Layout Settings', 'buzzstore'),
'panel'=> 'buzzstore_design_options'
));
$wp_customize->add_setting('buzzstore_page_layout', array(
'default' => 'leftsidebar',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_layout_sanitize' //done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control($wp_customize, 'buzzstore_page_layout', array(
'type' => 'radio',
'label' => __('Select layout for Pages. This layout will be reflected in all pages unless unique layout is set for specific page', 'buzzstore'),
'section' => 'buzzstore_layout_page_setting',
'settings' => 'buzzstore_page_layout',
'choices' => array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
)
)));
// Archive or Category page Layout only
$wp_customize->add_section('buzzstore_archive_page_layout_setting', array(
'priority' => 5,
'title' => __('Archive Page Layout Settings', 'buzzstore'),
'panel'=> 'buzzstore_design_options'
));
$wp_customize->add_setting('buzzstore_archive_page_layout', array(
'default' => 'nosidebar',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_layout_sanitize' //done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control( $wp_customize, 'buzzstore_archive_page_layout', array(
'type' => 'radio',
'label' => __('Select Category Page Layout', 'buzzstore'),
'section' => 'buzzstore_archive_page_layout_setting',
'settings' => 'buzzstore_archive_page_layout',
'choices' => array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
)
)));
// Layout for single posts
$wp_customize->add_section('buzzstore_single_posts_layout_setting', array(
'priority' => 6,
'title' => __('Single Posts Layout', 'buzzstore'),
'panel'=> 'buzzstore_design_options'
));
$wp_customize->add_setting('buzzstore_single_posts_layout', array(
'default' => 'nosidebar',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_layout_sanitize' //done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control($wp_customize, 'buzzstore_single_posts_layout', array(
'type' => 'radio',
'label' => __('Select Layout for Single Posts', 'buzzstore'),
'section' => 'buzzstore_single_posts_layout_setting',
'settings' => 'buzzstore_single_posts_layout',
'choices' => array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
)
)));
// Start of the Design Options
$wp_customize->add_section('buzzstore_custom_css_setting', array(
'priority' => 114,
'title' => __('Custom CSS', 'buzzstore'),
));
$wp_customize->add_setting('buzzstore_custom_css', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'wp_filter_nohtml_kses',
'sanitize_js_callback' => 'wp_filter_nohtml_kses' //done
));
$wp_customize->add_control('buzzstore_custom_css', array(
'type' => 'textarea',
'label' => __('Write your custom css', 'buzzstore'),
'section' => 'buzzstore_custom_css_setting',
'settings' => 'buzzstore_custom_css'
));
// End of the Design Options
// Start Footer Section here
$wp_customize->add_panel('buzzstore_footer_settings', array(
'priority' => 115,
'title' => __('Footer Settings', 'buzzstore'),
'capability' => 'edit_theme_options',
));
// Footer Area One Settings
$wp_customize->add_section('buzzstore_footer_area_one_settings', array(
'priority' => 5,
'title' => __('Footer Area One Settings', 'buzzstore'),
'panel'=> 'buzzstore_footer_settings'
));
$wp_customize->add_setting('buzzstore_footer_area_one_enable_disable_section', array(
'default' => 'disable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_footer_area_one_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Footer Area One Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_footer_area_one_settings',
'setting' => 'buzzstore_footer_area_one_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_footer_area_one_background_color', array(
'default' => '#222222',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_footer_area_one_background_color', array(
'type' => 'color',
'label' => __('Footer Area One Background Colors','buzzstore'),
'description' => __('Select default footer area one background color as you want', 'buzzstore'),
'section' => 'buzzstore_footer_area_one_settings',
));
$wp_customize->add_setting('buzzstore_footer_area_one_font_color', array(
'default' => '#ffffff',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_footer_area_one_font_color', array(
'type' => 'color',
'label' => __('Footer Area One Font Colors','buzzstore'),
'description' => __('Select default footer area one font color as you want', 'buzzstore'),
'section' => 'buzzstore_footer_area_one_settings',
));
$wp_customize->add_setting('buzzstore_footer_area_one_background_image', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw'
));
$wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'buzzstore_footer_area_one_background_image', array(
'label' => __('Upload Footer Area One Background Image', 'buzzstore'),
'section' => 'buzzstore_footer_area_one_settings',
'setting' => 'buzzstore_footer_area_one_background_image'
)));
/*$wp_customize->add_setting('buzzstore_footer_area_one_columns_options', array(
'default' => 4,
'capability' => 'edit_theme_options',
//'sanitize_callback' => 'buzzstore_layout_footer_sanitize' // done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control($wp_customize, 'buzzstore_footer_area_one_columns_options', array(
'type' => 'radio',
'label' => __('Choose Number of Columns', 'buzzstore'),
'section' => 'buzzstore_footer_area_one_settings',
'settings' => 'buzzstore_footer_area_one_columns_options',
'choices' => array(
'4' => $imagepath.'footer-4.png',
'3' => $imagepath.'footer-3.png',
'2' => $imagepath.'footer-2.png',
'1' => $imagepath.'footer-1.png',
)
)));*/
// Footer Area Two Settings
$wp_customize->add_section('buzzstore_footer_area_two_settings', array(
'priority' => 5,
'title' => __('Footer Area Two Settings', 'buzzstore'),
'panel'=> 'buzzstore_footer_settings'
));
$wp_customize->add_setting('buzzstore_footer_area_two_enable_disable_section', array(
'default' => 'enable',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_enable_sanitize', // done
));
$wp_customize->add_control('buzzstore_footer_area_two_enable_disable_section', array(
'type' => 'radio',
'label' => __('Enable or Disable Footer Area Two Section', 'buzzstore'),
'description' => __('Choose any options as you want','buzzstore'),
'section' => 'buzzstore_footer_area_two_settings',
'setting' => 'buzzstore_footer_area_two_enable_disable_section',
'choices' => array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
)));
$wp_customize->add_setting('buzzstore_footer_area_two_background_color', array(
'default' => '#222222',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control('buzzstore_footer_area_two_background_color', array(
'type' => 'color',
'label' => __('Footer Area Two Background Colors','buzzstore'),
'description' => __('Select default footer area two background color as you want', 'buzzstore'),
'section' => 'buzzstore_footer_area_two_settings',
));
// Footer Area One Settings
$wp_customize->add_section('buzzstore_footer_buttom_area_settings', array(
'priority' => 5,
'title' => __('Footer Buttom Area Settings', 'buzzstore'),
'panel'=> 'buzzstore_footer_settings'
));
$wp_customize->add_setting('buzzstore_footer_buttom_area_background_color', array(
'default' => '#333333',
'priority' => 2,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control('buzzstore_footer_buttom_area_background_color', array(
'type' => 'color',
'label' => __('Footer Buttom Area Background Colors','buzzstore'),
'description' => __('Select default footer buttom area background color as you want', 'buzzstore'),
'section' => 'buzzstore_footer_buttom_area_settings',
));
$wp_customize->add_setting('buzzstore_footer_buttom_copyright_setting', array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_textarea' //done
));
$wp_customize->add_control('buzzstore_footer_buttom_copyright_setting', array(
'type' => 'textarea',
'label' => __('Footer Bottom Left Content (Copyright Text)', 'buzzstore'),
'section' => 'buzzstore_footer_buttom_area_settings',
'settings' => 'buzzstore_footer_buttom_copyright_setting'
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_one', array(
'section' => 'paymentlogo_images',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
$wp_customize->add_setting( 'paymentlogo_image_two', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_two', array(
'section' => 'buzzstore_footer_buttom_area_settings',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
$wp_customize->add_setting( 'paymentlogo_image_three', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_three', array(
'section' => 'buzzstore_footer_buttom_area_settings',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
$wp_customize->add_setting( 'paymentlogo_image_four', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_four', array(
'section' => 'buzzstore_footer_buttom_area_settings',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
$wp_customize->add_setting( 'paymentlogo_image_five', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_five', array(
'section' => 'buzzstore_footer_buttom_area_settings',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
$wp_customize->add_setting( 'paymentlogo_image_six', array(
'default' => '',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'paymentlogo_image_six', array(
'section' => 'buzzstore_footer_buttom_area_settings',
'label' => __('Upload Payment Logo Image', 'buzzstore'),
'type' => 'image',
)));
// End footer section here
// Start of the Social Link Options
$wp_customize->add_panel('buzzstore_social_links_options', array(
'priority' => 112,
'title' => __('Social Media settings', 'buzzstore'),
'description'=> __('Change the Social Links Settings from here as you want', 'buzzstore'),
'capability' => 'edit_theme_options',
));
$wp_customize->add_section('buzzstore_social_link_activate_settings', array(
'priority' => 1,
'title' => __('Activate social links area', 'buzzstore'),
'panel' => 'buzzstore_social_links_options'
));
$wp_customize->add_setting('buzzstore_social_link_activate', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_link_activate', array(
'type' => 'checkbox',
'label' => __('Check to activate social links area', 'buzzstore'),
'section' => 'buzzstore_social_link_activate_settings',
'settings' => 'buzzstore_social_link_activate'
));
$buzzstore_social_links = array(
'buzzstore_social_facebook' => array(
'id' => 'buzzstore_social_facebook',
'title' => __('Facebook', 'buzzstore'),
'default' => ''
),
'buzzstore_social_twitter' => array(
'id' => 'buzzstore_social_twitter',
'title' => __('Twitter', 'buzzstore'),
'default' => ''
),
'buzzstore_social_googleplus' => array(
'id' => 'buzzstore_social_googleplus',
'title' => __('Google-Plus', 'buzzstore'),
'default' => ''
),
'buzzstore_social_instagram' => array(
'id' => 'buzzstore_social_instagram',
'title' => __('Instagram', 'buzzstore'),
'default' => ''
),
'buzzstore_social_pinterest' => array(
'id' => 'buzzstore_social_pinterest',
'title' => __('Pinterest', 'buzzstore'),
'default' => ''
),
'buzzstore_social_youtube' => array(
'id' => 'buzzstore_social_youtube',
'title' => __('YouTube', 'buzzstore'),
'default' => ''
),
);
$i = 20;
foreach($buzzstore_social_links as $buzzstore_social_link) {
$wp_customize->add_setting($buzzstore_social_link['id'], array(
'default' => $buzzstore_social_link['default'],
'capability' => 'edit_theme_options',
'sanitize_callback' => 'esc_url_raw' // done
));
$wp_customize->add_control($buzzstore_social_link['id'], array(
'label' => $buzzstore_social_link['title'],
'section'=> 'buzzstore_social_link_activate_settings',
'settings'=> $buzzstore_social_link['id'],
'priority' => $i
));
$wp_customize->add_setting($buzzstore_social_link['id'].'_checkbox', array(
'default' => 0,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' // done
));
$wp_customize->add_control($buzzstore_social_link['id'].'_checkbox', array(
'type' => 'checkbox',
'label' => __('Check to show in new tab', 'buzzstore'),
'section'=> 'buzzstore_social_link_activate_settings',
'settings'=> $buzzstore_social_link['id'].'_checkbox',
'priority' => $i
));
$i++;
}
$wp_customize->add_section('buzzstore_social_share_activate_settings', array(
'priority' => 1,
'title' => __('Activate social share area', 'buzzstore'),
'panel' => 'buzzstore_social_links_options'
));
$wp_customize->add_setting('buzzstore_social_share_activate', array(
'default' => 'yes',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_radio_sanitize' // done
));
$wp_customize->add_control('buzzstore_social_share_activate', array(
'type' => 'radio',
'label' => __('Enable/Disable Social Share Icons', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_activate',
'choices' => array(
'yes' => 'Enable',
'no' => 'Disable'
)
));
$wp_customize->add_setting('buzzstore_social_share_facebook', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_facebook', array(
'type' => 'checkbox',
'label' => __('Check to activate facebook', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_facebook'
));
$wp_customize->add_setting('buzzstore_social_share_twitter', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_twitter', array(
'type' => 'checkbox',
'label' => __('Check to activate twitter', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_twitter'
));
$wp_customize->add_setting('buzzstore_social_share_googleplus', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_googleplus', array(
'type' => 'checkbox',
'label' => __('Check to activate google plus', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_googleplus'
));
$wp_customize->add_setting('buzzstore_social_share_instagram', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_instagram', array(
'type' => 'checkbox',
'label' => __('Check to activate instagram', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_instagram'
));
$wp_customize->add_setting('buzzstore_social_share_pinterest', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_pinterest', array(
'type' => 'checkbox',
'label' => __('Check to activate pintrest', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_pinterest'
));
$wp_customize->add_setting('buzzstore_social_share_youtube', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_youtube', array(
'type' => 'checkbox',
'label' => __('Check to activate youtube', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_youtube'
));
$wp_customize->add_setting('buzzstore_social_share_email', array(
'default' => 1,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_checkbox_sanitize' //done
));
$wp_customize->add_control('buzzstore_social_share_email', array(
'type' => 'checkbox',
'label' => __('Check to activate email', 'buzzstore'),
'section' => 'buzzstore_social_share_activate_settings',
'settings' => 'buzzstore_social_share_email'
));
// End of the Social Link Options
// Start of the Social Link Options
$wp_customize->add_panel('buzzstore_color_options', array(
'priority' => 112,
'title' => __('Colors Options', 'buzzstore'),
'description'=> __('Change the Colors from here as you want', 'buzzstore'),
'capability' => 'edit_theme_options',
));
$wp_customize->get_section('colors' )->panel = 'buzzstore_color_options';
// Start of the WooCommerce Design Options
$wp_customize->add_panel('buzzstore_woocommerce_design_options', array(
'capabitity' => 'edit_theme_options',
'description' => __('Change the Design Settings and Options Settings of WooCommerce here as you want', 'buzzstore'),
'priority' => 104,
'title' => __('WooCommerce Settings', 'buzzstore')
));
// site archive layout setting
$wp_customize->add_section('buzzstore_woocommerce_category_page_settings', array(
'priority' => 2,
'title' => __('Category Pages Settings', 'buzzstore'),
'panel' => 'buzzstore_woocommerce_design_options'
));
$wp_customize->add_setting('buzzstore_woocommerce_category_page_layout', array(
'default' => 'rightsidebar',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_layout_sanitize' //done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control($wp_customize, 'buzzstore_woocommerce_category_page_layout', array(
'type' => 'radio',
'label' => __('Select WooCommerce Category Layout', 'buzzstore'),
'section' => 'buzzstore_woocommerce_category_page_settings',
'settings' => 'buzzstore_woocommerce_category_page_layout',
'choices' => array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
)
)));
$wp_customize->add_setting('buzzstore_woocommerce_category_product_per_page', array(
'default' => '4',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_product_per_page_sanitize' //done
));
$wp_customize->add_control('buzzstore_woocommerce_category_product_per_page', array(
'type' => 'select',
'label' => __('Products Per Row', 'buzzstore'),
'section' => 'buzzstore_woocommerce_category_page_settings',
'settings' => 'buzzstore_woocommerce_category_product_per_page',
'choices' => array(
'2' => '2',
'3' => '3',
'4' => '4',
)));
$wp_customize->add_setting('buzzstore_woocommerce_category_per_page_product_number', array(
'default' => 12,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_sanitize_number' // done
));
$wp_customize->add_control('buzzstore_woocommerce_category_per_page_product_number', array(
'type' => 'number',
'label' => __('Enter Products Per Page', 'buzzstore'),
'section' => 'buzzstore_woocommerce_category_page_settings',
'settings' => 'buzzstore_woocommerce_category_per_page_product_number'
));
// WooCommerce Product Page Settings
$wp_customize->add_section('buzzstore_woocommerce_product_page_settings', array(
'priority' => 2,
'title' => __('Product Page Settings', 'buzzstore'),
'panel' => 'buzzstore_woocommerce_design_options'
));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_layout', array(
'default' => 'rightsidebar',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_layout_sanitize' //done
));
$wp_customize->add_control(new BuzzStore_Image_Radio_Control($wp_customize, 'buzzstore_woocommerce_product_page_layout', array(
'type' => 'radio',
'label' => __('Select WooCommerce Single Layout', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_layout',
'choices' => array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
)
)));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_tab', array(
'default' => 'normaltabs',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_product_page_tab_sanitize' //done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_tab', array(
'type' => 'select',
'label' => __('Product Info Tabs style', 'buzzstore'),
'description' => __('Select how you want to display product info...', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_tab',
'choices' => array(
'normaltabs' => 'Normal Tabs',
'verticaltabs' => 'Vertical Tabs',
)));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_upsell_title', array(
'default' => 'complete the look',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_text_sanitize' // done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_upsell_title', array(
'type' => 'text',
'label' => __('Enter Up Sell Title', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_upsell_title'
));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_related_title', array(
'default' => 'Related Products',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_text_sanitize' // done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_related_title', array(
'type' => 'text',
'label' => __('Enter Related Products Title', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_related_title'
));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_related_product', array(
'default' => 'slider',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_page_related_product_sanitize' //done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_related_product', array(
'type' => 'select',
'label' => __('Related Products Display Style', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_related_product',
'choices' => array(
'none' => 'none',
'slider' => 'Slider',
'grid' => 'Grid'
)));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_related_product_col', array(
'default' => '4',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_product_per_page_related_sanitize' //done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_related_product_col', array(
'type' => 'select',
'label' => __('Related Products Display Per Row', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_related_product_col',
'choices' => array(
'3' => '3',
'6' => '6',
'9' => '9'
)));
$wp_customize->add_setting('buzzstore_woocommerce_product_page_related_product_number', array(
'default' => 12,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'buzzstore_sanitize_number' // done
));
$wp_customize->add_control('buzzstore_woocommerce_product_page_related_product_number', array(
'type' => 'number',
'label' => __('Max number of related products', 'buzzstore'),
'section' => 'buzzstore_woocommerce_product_page_settings',
'settings' => 'buzzstore_woocommerce_product_page_related_product_number'
));
// Web layout sanitization
function buzzstore_web_layout_sanitize($input) {
$valid_keys = array(
'boxed' => __('Boxed', 'buzzstore'),
'fullwidth' => __('Full Width', 'buzzstore')
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// text sanitization
function buzzstore_text_sanitize( $input ) {
return wp_kses_post( force_balance_tags( $input ) );
}
// Number
function buzzstore_sanitize_number( $input ) {
$output = intval($input);
return $output;
}
function buzzstore_show_radio_saniztize($input) {
$valid_keys = array(
'header_logo_only' => __('Header Logo Only', 'buzzstore'),
'header_text_only' => __('Header Text Only', 'buzzstore'),
'show_both' => __('Show Both', 'buzzstore'),
'disable' => __('Disable', 'buzzstore')
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_site_layout_sanitize($input) {
$valid_keys = array(
'boxed_layout' => __('Boxed Layout', 'buzzstore'),
'wide_layout' => __('Wide Layout', 'buzzstore')
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_layout_sanitize($input) {
$valid_keys = array(
'leftsidebar' => $imagepath.'left-sidebar.png',
'rightsidebar' => $imagepath.'right-sidebar.png',
'bothsidebar' => $imagepath.'both-sidebar.png',
'nosidebar' => $imagepath.'no-sidebar.png',
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// Themes Colors Options sanitize
function buzzstore_radio_number_sanitize($input) {
$valid_keys = array(
'2' => __('2', 'buzzstore'),
'3' => __('3', 'buzzstore'),
'4' => __('4', 'buzzstore'),
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// Header LeftSidebar Style Sanitize
function buzzstore_header_leftside_style_sanitize($input) {
$valid_keys = array(
'socialicon' => __('Social Icons','buzzstore'),
'topnavmenu' => __('Ton Nav Menu','buzzstore'),
'quickinfo' => __('Quick Information','buzzstore')
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// Footer Layout sanitize
function buzzstore_layout_footer_sanitize($input) {
$valid_keys = array(
'4' => $imagepath.'footer-4.png',
'3' => $imagepath.'footer-3.png',
'2' => $imagepath.'footer-2.png',
'1' => $imagepath.'footer-1.png',
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_product_per_page_sanitize($input) {
$valid_keys = array(
'2' => '2',
'3' => '3',
'4' => '4',
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_product_per_page_related_sanitize($input) {
$valid_keys = array(
'3' => '3',
'6' => '6',
'9' => '9',
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// checkbox sanitization
function buzzstore_checkbox_sanitize($input) {
if ( $input == 1 ) {
return 1;
} else {
return 0;
}
}
// radio button yes/no sanitization
function buzzstore_radio_sanitize($input) {
$valid_keys = array(
'yes'=>__('Yes', 'buzzstore'),
'no'=>__('No', 'buzzstore')
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_product_page_tab_sanitize($input) {
$valid_keys = array(
'normaltabs' => 'Normal Tabs',
'verticaltabs' => 'Vertical Tabs',
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_page_related_product_sanitize($input) {
$valid_keys = array(
'none' => 'none',
'slider' => 'Slider',
'grid' => 'Grid'
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_radio_enable_sanitize($input) {
$valid_keys = array(
'enable' => __('Enable', 'buzzstore'),
'disable' => __('Disable', 'buzzstore'),
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
function buzzstore_icon_block_display_sanitize($input) {
$valid_keys = array(
'below_slider' => __('Below Main Slider', 'buzzstore'),
'above_footer' => __('Above the Footer', 'buzzstore'),
);
if ( array_key_exists( $input, $valid_keys ) ) {
return $input;
} else {
return '';
}
}
// Top LeftSide Active CallBack Function Process
if ( ! function_exists( 'buzzstore_quickinfo_email_address' ) ) {
function buzzstore_quickinfo_email_address(){
if(esc_attr(get_theme_mod('buzzstore_header_leftside_options','quickinfo')) =='quickinfo'){
return true;
}else{
return false;
}
}
}
if ( ! function_exists( 'buzzstore_social_icon_callback' ) ) {
function buzzstore_social_icon_callback(){
if(esc_attr(get_theme_mod('buzzstore_header_leftside_options')) == 'socialicon'){
return true;
}else{
return false;
}
}
}
}
add_action( 'customize_register', 'buzzstore_customize_register' );
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
**/
function buzzstore_customize_preview_js() {
wp_enqueue_script( 'buzzstore_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
}
add_action( 'customize_preview_init', 'buzzstore_customize_preview_js' );