add_section('sidebars',array( 'title' => __('Sidebars', 'eroshiksavp'), 'description' => __('Options for page/blog sidebars of the theme','eroshiksavp'), 'priority' => 131 )); $wp_customize->add_setting('eroshiksavp_custom_text', array( 'default' => '', 'type' => 'customtext_control', 'capability' => 'edit_theme_options', 'transport' => 'refresh', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control', array( 'label' => __('Eroshik Blog Sidebar Profile','eroshiksavp'), 'section' => 'sidebars', 'settings' => 'eroshiksavp_custom_text', 'priority'=>1, 'extra' => __('You should use the "Eroshik Blog Sidebar Profile" widget to see the changes in action.','eroshiksavp') ) ) ); $wp_customize->add_setting('user_profile_picture', array( 'default' => esc_url(get_template_directory_uri() .'/images/avatar.png'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'user_profile_picture', array( 'label' => __('User Image', 'eroshiksavp'), 'section' => 'sidebars', 'settings' =>'user_profile_picture', 'priority' => 2 ))); $wp_customize->add_setting('first_name', array( 'default' => __('John','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('first_name',array( 'label' => __('First Name', 'eroshiksavp'), 'section' => 'sidebars', 'priority' => 3 )); $wp_customize->add_setting('last_name', array( 'default' => __('Doe','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('last_name',array( 'label' => __('Last Name', 'eroshiksavp'), 'section' => 'sidebars', 'priority' => 4 )); $wp_customize->add_setting('user_description', array( 'default' => __('Something great about you','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('user_description',array( 'label' => __('About You', 'eroshiksavp'), 'section' => 'sidebars', 'priority' => 5 )); $wp_customize->add_setting('eroshiksavp_custom_text_page_sidebar', array( 'default' => '', 'type' => 'customtext_control_page_sidebar', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_page_sidebar', array( 'label' => __('Page Sidebar','eroshiksavp'), 'section' => 'sidebars', 'settings' => 'eroshiksavp_custom_text_page_sidebar', 'priority'=>6 ) ) ); $wp_customize->add_setting('sidebar_visibility', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('sidebar_visibility',array( 'label' => __('Sidebar visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'sidebars', 'priority' => 7 )); $wp_customize->add_setting('sidebar_align', array( 'type' => 'theme_mod', 'default' => 'r', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_radio' )); $wp_customize->add_control('sidebar_align',array( 'label' => __('Sidebar alignment', 'eroshiksavp'), 'type' => 'radio', 'section' => 'sidebars', 'priority' => 8, 'choices' => array('l'=>__('Left','eroshiksavp'),'r'=>__('Right','eroshiksavp')) )); $wp_customize->add_setting('sidebar_visibility_on_home', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('sidebar_visibility_on_home',array( 'label' => __('Sidebar visibilitly on home page', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'sidebars', 'priority' => 9 )); $wp_customize->add_setting('eroshiksavp_custom_text_blog_sidebar', array( 'default' => '', 'type' => 'customtext_control_blog_sidebar', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_blog_sidebar', array( 'label' => __('Blog Sidebar','eroshiksavp'), 'section' => 'sidebars', 'settings' => 'eroshiksavp_custom_text_blog_sidebar', 'priority'=> 10 ) ) ); $wp_customize->add_setting('blog_sidebar_visibility', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('blog_sidebar_visibility',array( 'label' => __('Blog sidebar visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'sidebars', 'priority' => 11 )); $wp_customize->add_setting('blog_sidebar_align', array( 'type' => 'theme_mod', 'default' => 'r', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_radio' )); $wp_customize->add_control('blog_sidebar_align',array( 'label' => __('Sidebar alignment', 'eroshiksavp'), 'type' => 'radio', 'section' => 'sidebars', 'priority' => 12, 'choices' => array('l'=>__('Left','eroshiksavp'),'r'=>__('Right','eroshiksavp')) )); $wp_customize->add_setting('blog_sidebar_visibility_on_home', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('blog_sidebar_visibility_on_home',array( 'label' => __('Blog sidebar visibilitly on home page', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'sidebars', 'priority' => 13 )); $wp_customize->add_setting('eroshiksavp_custom_text_archive_sidebar', array( 'default' => '', 'type' => 'customtext_control_archive_sidebar', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_archive_sidebar', array( 'label' => __('Archive Sidebar','eroshiksavp'), 'section' => 'sidebars', 'settings' => 'eroshiksavp_custom_text_archive_sidebar', 'priority'=> 14 ) ) ); $wp_customize->add_setting('archive_sidebar_visibility', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('archive_sidebar_visibility',array( 'label' => __('Archive sidebar visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'sidebars', 'priority' => 15 )); $wp_customize->add_setting('archive_sidebar_align', array( 'type' => 'theme_mod', 'default' => 'r', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_radio' )); $wp_customize->add_control('archive_sidebar_align',array( 'label' => __('Archive sidebar alignment', 'eroshiksavp'), 'type' => 'radio', 'section' => 'sidebars', 'priority' => 16, 'choices' => array('l'=>__('Left','eroshiksavp'),'r'=>__('Right','eroshiksavp')) )); //theme options $wp_customize->add_section('theme_options',array( 'title' => __('Theme options', 'eroshiksavp'), 'description' => __('Options for overall theme settings','eroshiksavp'), 'priority' => 130 )); $wp_customize->add_setting('layout_full_width', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('layout_full_width',array( 'label' => __('Make the content area full width', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 1 )); $wp_customize->add_setting('eroshiksavp_custom_text_header', array( 'default' => '', 'type' => 'customtext_control_header', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_header', array( 'label' => __('Header Widget Section','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_text_header', 'priority'=>2, 'extra' => __('Enable the below option if you want the entire header as a widget area. Which gives more control over customization.','eroshiksavp') ) ) ); $wp_customize->add_setting('default_header_visibility', array( 'type' => 'theme_mod', 'default' => false, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('default_header_visibility',array( 'label' => __('Make default header as a widget area', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 3 )); $wp_customize->add_setting('default_header_visibility_at_home', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('default_header_visibility_at_home',array( 'label' => __('Make header widget visible at home page only', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 4 )); $wp_customize->add_setting('eroshiksavp_custom_text_top_page', array( 'default' => '', 'type' => 'customtext_control_top_page', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_top_page', array( 'label' => __('Top Page Section Widget','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_text_top_page', 'priority'=> 5, 'extra' => __('You should use the "Top Page Section" widget area to see the changes in action.','eroshiksavp') ) ) ); $wp_customize->add_setting('top_page_to_visibility', array( 'type' => 'theme_mod', 'default' => 'alp', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_choice' )); $wp_customize->add_control('top_page_to_visibility',array( 'label' => __('Choose the visibility setting for Top Page Section Widget', 'eroshiksavp'), 'type' => 'select', 'section' => 'theme_options', 'choices' => array('hpo'=>__('Homepage Only','eroshiksavp'),'exh'=>__('Except Homepage','eroshiksavp'),'alp'=>__('All Pages','eroshiksavp')), 'priority' => 6 )); $wp_customize->add_setting('eroshiksavp_custom_text_header_elements', array( 'default' => '', 'type' => 'customtext_control_header_elements', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_header_elements', array( 'label' => __('Site header options','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_text_header_elements', 'priority'=> 7, 'extra' => __('Use the options to change options for site header','eroshiksavp') ) ) ); $wp_customize->add_setting('showcase_logo', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'showcase_logo', array( 'label' => __('Header logo', 'eroshiksavp'), 'section' => 'theme_options', 'settings' => 'showcase_logo', 'priority' => 8 ))); $wp_customize->add_setting('showcase_login_visible', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('showcase_login_visible',array( 'label' => __('Primary button visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 9 )); $wp_customize->add_setting('showcase_l_b_text', array( 'default' => __('Login','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_l_b_text',array( 'label' => __('Primary button text', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 10 )); $wp_customize->add_setting('showcase_l_b_url', array( 'default' => esc_url('http://example.com'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_l_b_url',array( 'label' => __('Primary button url', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 11 )); $wp_customize->add_setting('showcase_signup_visible', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('showcase_signup_visible',array( 'label' => __('Secondary button visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 12 )); $wp_customize->add_setting('showcase_s_b_text', array( 'default' => __('Signup','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_s_b_text',array( 'label' => __('Secondary button text', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 13 )); $wp_customize->add_setting('showcase_s_b_url', array( 'default' => esc_url('http://example.com'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_s_b_url',array( 'label' => __('Secondary button url', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 14 )); $wp_customize->add_setting('showcase_signup_visible', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('showcase_signup_visible',array( 'label' => __('Secondary button visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 15 )); $wp_customize->add_setting('showcase_s_b_text', array( 'default' => __('Signup','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_s_b_text',array( 'label' => __('Secondary button text', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 16 )); $wp_customize->add_setting('showcase_s_b_url', array( 'default' => esc_url('http://example.com'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('showcase_s_b_url',array( 'label' => __('Secondary button url', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 17 )); $wp_customize->add_setting('eroshiksavp_custom_top_bar', array( 'default' => '', 'type' => 'customtext_control_top_bar', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_top_bar', array( 'label' => __('Top bar options','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_top_bar', 'priority'=> 18 ) ) ); $wp_customize->add_setting('top_bar_visibility', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('top_bar_visibility',array( 'label' => __('Top bar visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 19 )); $wp_customize->add_setting('social_icons_visibility', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('social_icons_visibility',array( 'label' => __('Social icons visibility', 'eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 20 )); $wp_customize->add_setting('phone_number', array( 'default' => __('000-000-100-0','eroshiksavp'), 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('phone_number',array( 'label' => __('Phone number', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 21 )); $wp_customize->add_setting('email', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('email',array( 'default' => 'youremail@example.com', 'label' => __('Email', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 22 )); $wp_customize->add_setting('facebook_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('facebook_handler',array( 'label' => __('Facebook handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 23 )); $wp_customize->add_setting('twitter_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('twitter_handler',array( 'label' => __('Twitter handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 24 )); $wp_customize->add_setting('linkedin_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('linkedin_handler',array( 'label' => __('Linkedin handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 25 )); $wp_customize->add_setting('youtube_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('youtube_handler',array( 'label' => __('Youtube handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 26 )); $wp_customize->add_setting('instagram_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('instagram_handler',array( 'label' => __('Instagram handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 27 )); $wp_customize->add_setting('rss_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('rss_handler',array( 'label' => __('RSS Feed (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 28 )); $wp_customize->add_setting('pinterest_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('pinterest_handler',array( 'label' => __('Pinterest handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 29 )); $wp_customize->add_setting('google_plus_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('google_plus_handler',array( 'label' => __('Google Plus handler (Full Url)', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 20 )); $wp_customize->add_setting('skype_handler', array( 'default' =>'#', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('skype_handler',array( 'label' => __('Skype handler', 'eroshiksavp'), 'section' => 'theme_options', 'priority' => 31 )); $wp_customize->add_setting('eroshiksavp_custom_text_menu_bar', array( 'default' => '', 'type' => 'customtext_control_menu_bar', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_menu_bar', array( 'label' => __('Menu Bar','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_text_menu_bar', 'priority'=> 32 ) ) ); $wp_customize->add_setting('fixed_menu', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('fixed_menu',array( 'label' => __('Make menu-bar fixed', 'eroshiksavp'), 'description' => __('Make the menu bar static-top.','eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 33 )); $wp_customize->add_setting('eroshiksavp_custom_text_breadcrumb', array( 'default' => '', 'type' => 'customtext_control_breadcrumb', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_breadcrumb', array( 'label' => __('Breadcrumb','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_text_breadcrumb', 'priority'=> 34, 'extra' => __('Use this for breadcrumb settings.','eroshiksavp') ) ) ); $wp_customize->add_setting('display_breadcrumb', array( 'type' => 'theme_mod', 'default' => true, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_checkbox' )); $wp_customize->add_control('display_breadcrumb',array( 'label' => __('Display breadcrumb', 'eroshiksavp'), 'description' => __('Display breadcrumb below the header.','eroshiksavp'), 'type' => 'checkbox', 'section' => 'theme_options', 'priority' => 35 )); $wp_customize->add_setting('eroshiksavp_custom_page_title', array( 'default' => '', 'type' => 'customtext_control_page_title', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Custom_Text_Control( $wp_customize, 'customtext_control_page_title', array( 'label' => __('Page Title','eroshiksavp'), 'section' => 'theme_options', 'settings' => 'eroshiksavp_custom_page_title', 'priority'=> 36, 'extra' => __('Use this page title display settings.','eroshiksavp') ) ) ); $wp_customize->add_setting( 'page_title_visibility', array( 'capability' => 'edit_theme_options', 'default' => 'via', 'sanitize_callback' => 'eroshiksavp_sanitize_choice' ) ); $wp_customize->add_control( 'page_title_visibility', array( 'type' => 'select', 'section' => 'theme_options', // Add a default or your own section 'label' => __( 'Select page title visibility','eroshiksavp' ), 'priority' => 37, 'choices' =>array('rfh'=>'Remove from home page only', 'via'=>'Visible in all pages', 'rfl' =>'Remove from all pages') ) ); //theme color $wp_customize->add_setting('foreground_color', array( 'type' => 'theme_mod', 'default' => '#fbfbfb', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'foreground_color', array( 'label' => __( 'Theme foreground color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 18 ))); $wp_customize->add_setting('primary_color', array( 'type' => 'theme_mod', 'default' => '#5a5560', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_color', array( 'label' => __( 'Theme primary color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 19 ))); $wp_customize->add_setting('secondary_color', array( 'type' => 'theme_mod', 'default' => '#FAED26', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_color', array( 'label' => __( 'Theme secondary color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 20 ))); $wp_customize->add_setting('header_widget_bg_color', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_widget_bg_color', array( 'label' => __( 'Header Widget background color', 'eroshiksavp' ), 'description' => __( 'You must implement Header Widget area','eroshiksavp'), 'section' => 'colors', 'priority' => 21 ))); $wp_customize->add_setting('top_page_widget_bg_color', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_page_widget_bg_color', array( 'label' => __( 'Page Top Bar widget background color', 'eroshiksavp' ), 'description' => __( 'You must implement Page Top Widget area','eroshiksavp'), 'section' => 'colors', 'priority' => 22 ))); $wp_customize->add_setting('top_bar_bg', array( 'type' => 'theme_mod', 'default' => '#5a5560', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_bar_bg', array( 'label' => __( 'Top bar background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 23 ))); $wp_customize->add_setting('top_bar_text_color', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'top_bar_text_color', array( 'label' => __( 'Top bar color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 24 ))); $wp_customize->add_setting('showcase_background', array( 'type' => 'theme_mod', 'default' => '#FFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'showcase_background', array( 'label' => __( 'Header background', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 25 ))); $wp_customize->add_setting('showcase_l_b_color', array( 'type' => 'theme_mod', 'default' => '#000000', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'showcase_l_b_color', array( 'label' => __( 'Primary button background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 26 ))); $wp_customize->add_setting('showcase_l_b_text_color', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'showcase_l_b_text_color', array( 'label' => __( 'Primary button text color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 27 ))); $wp_customize->add_setting('showcase_s_b_color', array( 'type' => 'theme_mod', 'default' => '#000000', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'showcase_s_b_color', array( 'label' => __( 'Secondary button background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 28 ))); $wp_customize->add_setting('showcase_s_b_text_color', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'showcase_s_b_text_color', array( 'label' => __( 'Secondary button text color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 29 ))); $wp_customize->add_setting('menu_bar_bg', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_bar_bg', array( 'label' => __( 'Menu bar background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 30 ))); $wp_customize->add_setting('menu_color', array( 'type' => 'theme_mod', 'default' => '#000000', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_color', array( 'label' => __( 'Menu color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 31 ))); $wp_customize->add_setting('menu_color_active', array( 'type' => 'theme_mod', 'default' => '#02acac', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'menu_color_active', array( 'label' => __( 'Menu active-hover color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 32 ))); $wp_customize->add_setting('sidebar_bg', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sidebar_bg', array( 'label' => __( 'Page Sidebar background', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 33 ))); $wp_customize->add_setting('blog_sidebar_bg', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'blog_sidebar_bg', array( 'label' => __( 'Blog Sidebar background', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 34 ))); $wp_customize->add_setting('archive_sidebar_bg', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'archive_sidebar_bg', array( 'label' => __( 'Archive Sidebar background', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 35 ))); $wp_customize->add_setting('footer_bg', array( 'type' => 'theme_mod', 'default' => '#FFFFFF', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_bg', array( 'label' => __( 'Footer background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 36 ))); $wp_customize->add_setting('footer_text_color', array( 'type' => 'theme_mod', 'default' => '#5a5560', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_text_color', array( 'label' => __( 'Footer text color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 37 ))); $wp_customize->add_setting('footer_copy_right_bg', array( 'type' => 'theme_mod', 'default' => '#5a5560', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_copy_right_bg', array( 'label' => __( 'Footer copyright background color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 38 ))); $wp_customize->add_setting('footer_copy_right_t_color', array( 'type' => 'theme_mod', 'default' => '#FAED26', 'sanitize_callback' => 'eroshiksavp_sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_copy_right_t_color', array( 'label' => __( 'Footer copyright text color', 'eroshiksavp' ), 'description' => __( 'Select a color','eroshiksavp'), 'section' => 'colors', 'priority' => 39 ))); //footer $wp_customize->add_section('footer',array( 'title' => __('Footer', 'eroshiksavp'), 'description' => __('Options for footer','eroshiksavp'), 'priority' => 134 )); $wp_customize->add_setting('footer_copy_right_text', array( 'default' => 'Copyright Eroshiksavp', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('footer_copy_right_text',array( 'label' => __('Footer copyright text', 'eroshiksavp'), 'section' => 'footer', 'priority' => 1 )); $wp_customize->add_setting('footer_copy_right_text_size', array( 'default' => '15px', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('footer_copy_right_text_size',array( 'label' => __('Footer copyright text size in px', 'eroshiksavp'), 'section' => 'footer', 'priority' => 2 )); $wp_customize->add_setting('footer_text_align', array( 'type' => 'theme_mod', 'default' => 'c', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_radio' )); $wp_customize->add_control('footer_text_align',array( 'label' => __('Footer text alignment', 'eroshiksavp'), 'type' => 'radio', 'section' => 'footer', 'priority' => 3, 'choices' => array('l'=>__('Left','eroshiksavp'),'r'=>__('Right','eroshiksavp'),'c'=>__('Center','eroshiksavp')) )); $wp_customize->add_setting('footer_columns', array( 'type' => 'theme_mod', 'default' => '4', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshiksavp_sanitize_radio' )); $wp_customize->add_control('footer_columns',array( 'label' => __('Footer columns', 'eroshiksavp'), 'type' => 'radio', 'section' => 'footer', 'priority' => 4, 'choices' => array('1'=>__('One','eroshiksavp'),'2'=>__('Two','eroshiksavp'),'3'=>__('Three','eroshiksavp'),'4'=>__('Four','eroshiksavp')) )); //footer ends //typgrpahy $wp_customize->add_panel( 'typography_pannel', array( 'capability' => 'edit_theme_options', 'priority' => 129, 'title' => __('Typography', 'eroshiksavp') ) ); $wp_customize->add_section('content_fonts', array( 'title' => __( 'Content' , 'eroshiksavp' ), 'panel' =>'typography_pannel' ) ); $wp_customize->add_setting( 'theme_font', array( 'default' => 'Hind:300,regular,500,600,700', 'transport' => 'refresh', 'sanitize_callback' => 'eroshiksavp_sanitize_choice' ) ); $wp_customize->add_control( 'theme_font', array( 'label' => __( 'Content font family', 'eroshiksavp' ), 'type' => 'select', 'section' => 'content_fonts', 'choices' => eroshik_savp_fonts_array(), 'priority' => 1 ) ); $wp_customize->add_setting( 'theme_conetnt_font_size', array( 'default' => '17', 'transport' => 'refresh', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' ) ); $wp_customize->add_control( 'theme_conetnt_font_size', array( 'label' => __( 'Content font size in px', 'eroshiksavp' ), 'type' => 'number', 'section' => 'content_fonts', 'priority' => 2 ) ); $wp_customize->add_section('header_fonts', array( 'title' => __( 'Header' , 'eroshiksavp' ), 'panel' =>'typography_pannel' ) ); $wp_customize->add_setting( 'header_font_family', array( 'default' => 'Hind:300,regular,500,600,700', 'transport' => 'refresh', 'sanitize_callback' => 'eroshiksavp_sanitize_choice' ) ); $wp_customize->add_control( 'header_font_family', array( 'label' => __( 'Header font family', 'eroshiksavp' ), 'type' => 'select', 'section' => 'header_fonts', 'choices' => eroshik_savp_fonts_array(), 'priority' => 1 ) ); $wp_customize->add_setting('header_title_font_size', array( 'default' => '40px', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('header_title_font_size',array( 'label' => __('Header title font size', 'eroshiksavp'), 'description' => __('Insert a size, for header title', 'eroshiksavp'), 'section' => 'header_fonts', 'priority' => 2 )); $wp_customize->add_setting('header_tag_font_size', array( 'default' => '18px', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('header_tag_font_size',array( 'label' => __('Header description font size', 'eroshiksavp'), 'description' => __('Insert a size, for header description', 'eroshiksavp'), 'section' => 'header_fonts', 'priority' => 3 )); $wp_customize->add_setting('header_tag_top_margin', array( 'default' => '10px', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' )); $wp_customize->add_control('header_tag_top_margin',array( 'label' => __('Header description top margin', 'eroshiksavp'), 'description' => __('Insert a margin top, for header description', 'eroshiksavp'), 'section' => 'header_fonts', 'priority' => 4 )); $wp_customize->add_section('menu_fonts', array( 'title' => __( 'Menu' , 'eroshiksavp' ), 'panel' =>'typography_pannel' ) ); $wp_customize->add_setting( 'menu_font_family', array( 'default' => 'Hind:300,regular,500,600,700', 'transport' => 'refresh', 'sanitize_callback' => 'eroshiksavp_sanitize_choice' ) ); $wp_customize->add_control( 'menu_font_family', array( 'label' => __( 'Menu font family', 'eroshiksavp' ), 'type' => 'select', 'section' => 'menu_fonts', 'choices' => eroshik_savp_fonts_array(), 'priority' => 1 ) ); $wp_customize->add_setting( 'menu_font_size', array( 'default' => '20', 'transport' => 'refresh', 'sanitize_callback' => 'eroshik_savp_sanitize_texts' ) ); $wp_customize->add_control( 'menu_font_size', array( 'label' => __( 'Menu font size in px', 'eroshiksavp' ), 'type' => 'number', 'section' => 'menu_fonts', 'priority' => 2 ) ); }//function ends }//functions exist ends if(!function_exists( 'eroshik_savp_fonts_array' )){ function eroshik_savp_fonts_array(){ return array( 'Abel:regular' => 'Abel', 'Alegreya Sans:100,100italic,300,300italic,regular,italic,500,500italic,700,700italic,800,800italic,900,900italic' => 'Alegreya Sans', 'Arimo:regular,italic,700,700italic' => 'Arimo', 'Arvo:regular,italic,700,700italic' => 'Arvo', 'Asap:regular,italic,700,700italic' => 'Asap', 'Bitter:regular,italic,700' => 'Bitter', 'Bree Serif:regular' => 'Bree Serif', 'Cabin:regular,italic,500,500italic,600,600italic,700,700italic' => 'Cabin', 'Catamaran:300,regular,600,700,800' => 'Catamaran', 'Crimson Text:regular,italic,600,600italic,700,700italic' => 'Crimson Text', 'Cuprum:regular,italic,700,700italic' => 'Cuprum', 'Dosis:200,300,regular,500,600,700,800' => 'Dosis', 'Droid Sans:regular,700' => 'Droid Sans', 'Droid Serif:regular,italic,700,700italic' => 'Droid Serif', 'Exo:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic' => 'Exo', 'Exo 2:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic' => 'Exo 2', 'Fjalla One:regular' => 'Fjalla One', 'Hind:300,regular,500,600,700' => 'Hind', 'Inconsolata:regular,700' => 'Inconsolata', 'Josefin Sans:100,100italic,300,300italic,regular,italic,600,600italic,700,700italic' => 'Josefin Sans', 'Karla:regular,italic,700,700italic' => 'Karla', 'Lato:100,100italic,300,300italic,regular,italic,700,700italic,900,900italic' => 'Lato', 'Lora:regular,italic,700,700italic' => 'Lora', 'Maven Pro:regular,500,700,900' => 'Maven Pro', 'Merriweather:300,300italic,regular,italic,700,700italic,900,900italic' => 'Merriweather', 'Merriweather Sans:300,300italic,regular,italic,700,700italic,800,800italic' => 'Merriweather Sans', 'Montserrat:regular,700' => 'Montserrat', 'Muli:300,300italic,regular,italic' => 'Muli', 'Noto Sans:regular,italic,700,700italic' => 'Noto Sans', 'Noto Serif:regular,italic,700,700italic' => 'Noto Serif', 'Nunito:300,regular,700' => 'Nunito', 'Open Sans:300,300italic,regular,italic,600,600italic,700,700italic,800,800italic' => 'Open Sans', 'Orbitron:regular,500,700,900' => 'Orbitron', 'Oswald:300,regular,700' => 'Oswald', 'Oxygen:300,regular,700' => 'Oxygen', 'Passion One:regular,700,900' => 'Passion One', 'Play:regular,700' => 'Play', 'Playfair Display:regular,italic,700,700italic,900,900italic' => 'Playfair Display', 'Poppins:300,regular,500,600,700' => 'Poppins', 'PT Sans:regular,italic,700,700italic' => 'PT Sans', 'PT Serif:regular,italic,700,700italic' => 'PT Serif', 'Raleway:100,200,300,regular,500,600,700,800,900' => 'Raleway', 'Roboto:100,100italic,300,300italic,regular,italic,500,500italic,700,700italic,900,900italic' => 'Roboto', 'Roboto Slab:100,300,regular,700' => 'Roboto Slab', 'Rubik:300,regular,700' => 'Rubik', 'Signika:300,regular,600,700' => 'Signika', 'Source Sans Pro:200,200italic,300,300italic,regular,italic,600,600italic,700,700italic,900,900italic' => 'Source Sans Pro', 'Titillium Web:200,200italic,300,300italic,regular,italic,600,600italic,700,700italic,900' => 'Titillium Web', 'Ubuntu:300,300italic,regular,italic,500,500italic,700,700italic' => 'Ubuntu', 'Vollkorn:regular,italic,700,700italic' => 'Vollkorn', 'Yanone Kaffeesatz:200,300,regular,700' => 'Yanone Kaffeesatz',); } } add_action('customize_register', 'eroshik_savp_cr'); //sanatize text fields if ( ! function_exists( 'eroshik_savp_sanitize_texts' ) ) { function eroshik_savp_sanitize_texts($string_input){ $string_output=sanitize_text_field($string_input); return $string_output; } } if ( ! function_exists( 'eroshiksavp_sanitize_checkbox' ) ) { function eroshiksavp_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } } if ( ! function_exists( 'eroshiksavp_sanitize_radio' ) ) { function eroshiksavp_sanitize_radio( $input, $setting ) { // Ensure input is a slug. $input = sanitize_key( $input ); // Get list of choices from the control associated with the setting. $choices = $setting->manager->get_control( $setting->id )->choices; // If the input is a valid key, return it; otherwise, return the default. return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } } if ( ! function_exists( 'eroshiksavp_sanitize_choice' ) ) { function eroshiksavp_sanitize_choice( $input, $setting ) { $input = sanitize_text_field($input); $choices = $setting->manager->get_control( $setting->id )->choices; return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } } if ( ! function_exists( 'eroshiksavp_sanitize_hex_color' ) ) { function eroshiksavp_sanitize_hex_color( $hex_color, $setting ) { // Sanitize $input as a hex value without the hash prefix. $hex_color = sanitize_hex_color( $hex_color ); // If $input is a valid hex value, return it; otherwise, return the default. return ( ! empty( $hex_color ) ? $hex_color : $setting->default ); } } ?>