get_section( 'title_tagline' )->panel = 'general_panel'; $wp_customize->get_section( 'title_tagline' )->priority = '5'; $wp_customize->get_section( 'static_front_page' )->panel = 'general_panel'; $wp_customize->get_section( 'static_front_page' )->priority = '6'; $wp_customize->add_panel( 'general_panel', array( 'priority' => 1, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'General Settings', 'abcblog' ), ) ); $wp_customize->add_section( 'header_section' , array( 'title' => esc_html__( 'Header Settings', 'abcblog' ), 'priority' => 1, 'description' => 'Control the site header', 'panel' => 'general_panel' ) ); $wp_customize->add_setting('theme_logo', array( 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'theme_logo', array( 'label' => esc_html__( 'Site Logo', 'abcblog' ), 'section' => 'header_section', 'settings' => 'theme_logo', 'priority' => 1, ) ) ); $wp_customize->add_setting('logo_height', array( 'default' => '70', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'logo_height', array( 'settings' => 'logo_height', 'label' => esc_html__('Logo Height', 'abcblog'), 'description' => esc_html__('Enter value only like 70', 'abcblog'), 'section' => 'header_section', 'type' => 'text', 'priority' => 2, )); $wp_customize->add_setting('sticky_logo_height', array( 'default' => '45', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'sticky_logo_height', array( 'settings' => 'sticky_logo_height', 'label' => esc_html__('Sticky Logo Height', 'abcblog'), 'description' => esc_html__('Enter value only like 45', 'abcblog'), 'section' => 'header_section', 'type' => 'text', 'priority' => 3, )); $wp_customize->add_section( 'social_media_section' , array( 'title' => esc_html__( 'Social Media', 'abcblog' ), 'priority' => 2, 'description' => esc_html__( 'Enter Social Media Links, icons will show up when links inserted, leave blank if anyone not need.', 'abcblog' ), 'panel' => 'general_panel' ) ); $wp_customize->add_setting( 'social_icons_color' , array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '#222222', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'social_icons_color', array( 'label' => esc_html__( 'Icons Color', 'abcblog' ), 'section' => 'social_media_section', 'settings' => 'social_icons_color', 'priority' => 1, ) ) ); $wp_customize->add_setting( 'social_icons_hover_color' , array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '#0e9ca5', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'social_icons_hover_color', array( 'label' => esc_html__( 'Icons Hover Color', 'abcblog' ), 'section' => 'social_media_section', 'settings' => 'social_icons_hover_color', 'priority' => 2, ) ) ); $wp_customize->add_setting( 'fb_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'fb_link', array( 'label' => esc_html__('Facebook link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'fb_link', 'type' => 'text', 'priority' => 3, ) ); $wp_customize->add_setting( 'tw_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'tw_link', array( 'label' => esc_html__('Twitter link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'tw_link', 'type' => 'text', 'priority' => 4, ) ); $wp_customize->add_setting( 'gp_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'gp_link', array( 'label' => esc_html__('Google Plus link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'gp_link', 'type' => 'text', 'priority' => 5, ) ); $wp_customize->add_setting( 'ins_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'ins_link', array( 'label' => esc_html__('Instagram link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'ins_link', 'type' => 'text', 'priority' => 6, ) ); $wp_customize->add_setting( 'pi_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'pi_link', array( 'label' => esc_html__('Pinterest link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'pi_link', 'type' => 'text', 'priority' => 7, ) ); $wp_customize->add_setting( 'in_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'in_link', array( 'label' => esc_html__('Linkedin link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'in_link', 'type' => 'text', 'priority' => 8, ) ); $wp_customize->add_setting( 'yt_link' , array( 'sanitize_callback' => 'abcblog_sanitize_text', ) ); $wp_customize->add_control( 'yt_link', array( 'label' => esc_html__('Youtube link', 'abcblog'), 'section' => 'social_media_section', 'settings' => 'yt_link', 'type' => 'text', 'priority' => 9, ) ); $wp_customize->add_section( 'site_element_control' , array( 'title' => esc_html__( 'Site Elements Control', 'abcblog' ), 'priority' => 3, 'panel' => 'general_panel' ) ); $wp_customize->add_setting('show_search_icons', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_search_icons', array( 'settings' => 'show_search_icons', 'label' => esc_html__( 'Display Search Icon on Header?', 'abcblog' ), 'section' => 'site_element_control', 'priority' => 1, 'type' => 'select', 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting('show_backto_top', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_backto_top', array( 'settings' => 'show_backto_top', 'label' => esc_html__( 'Display Back to Top Button?', 'abcblog' ), 'section' => 'site_element_control', 'priority' => 3, 'type' => 'select', 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting('show_preloader', array( 'default' => 'yes', 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( 'show_preloader', array( 'settings' => 'show_preloader', 'label' => esc_html__( 'Display Site Preloader?', 'abcblog' ), 'section' => 'site_element_control', 'priority' => 4, 'type' => 'select', 'choices' => array( 'yes' => 'Yes', 'no' => 'No', ), )); $wp_customize->add_setting( 'preload_color' , array( 'sanitize_callback' => 'sanitize_hex_color', 'default' => '#86d0d5', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'preload_color', array( 'label' => esc_html__( 'Preloader Screen Background Color', 'abcblog' ), 'section' => 'site_element_control', 'settings' => 'preload_color', 'priority' => 5, ) ) ); $wp_customize->add_setting('preloader_image', array( 'sanitize_callback' => '__return_false_value', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'preloader_image', array( 'label' => esc_html__( 'Preloader Image', 'abcblog' ), 'section' => 'site_element_control', 'settings' => 'preloader_image', 'priority' => 6, ) ) ); $wp_customize->add_section( 'abc_advance' , array( 'title' => esc_html__( 'Advance Settings', 'abcblog' ), 'priority' => 20, 'panel' => 'general_panel' ) ); $wp_customize->add_setting('g_map_api', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'abcblog_sanitize_text', )); $wp_customize->add_control( 'g_map_api', array( 'settings' => 'g_map_api', 'label' => esc_html__( 'Google Map API Key', 'abcblog' ), 'description' => esc_html__( 'Enter google map API key in order to work google maps. Temporary you can use this key, but you should use your own to work properly AIzaSyBdPIpttUIG3gpovmvFSFe07GKvM-Xtrf4', 'abcblog' ), 'section' => 'abc_advance', 'type' => 'text', 'priority' => 1, )); $wp_customize->add_setting( 'g_analytics_code' , array( 'sanitize_callback' => '__return_false_value', ) ); $wp_customize->add_control( 'g_analytics_code', array( 'label' => esc_html__('Google Analytics', 'abcblog'), 'description' => esc_html__('Paste Google analytics code here, code will be added in header.', 'abcblog'), 'section' => 'abc_advance', 'settings' => 'g_analytics_code', 'type' => 'textarea', 'priority' => 2, ) ); } add_action( 'customize_register', 'abcblog_general_settings_register' );