add_panel( 'theme_option_panel', array( 'title' => esc_html__( 'Theme Options', 'business-buzz' ), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); // Header Section. $wp_customize->add_section( 'section_header', array( 'title' => esc_html__( 'Header Options', 'business-buzz' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); // Setting show_title. $wp_customize->add_setting( 'theme_options[show_title]', array( 'default' => $default['show_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_title]', array( 'label' => esc_html__( 'Show Site Title', 'business-buzz' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting show_tagline. $wp_customize->add_setting( 'theme_options[show_tagline]', array( 'default' => $default['show_tagline'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_tagline]', array( 'label' => esc_html__( 'Show Tagline', 'business-buzz' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting contact_number. $wp_customize->add_setting( 'theme_options[contact_number]', array( 'default' => $default['contact_number'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[contact_number]', array( 'label' => __( 'Contact Number', 'business-buzz' ), 'section' => 'section_header', 'type' => 'text', 'priority' => 100, ) ); // Setting contact_email. $wp_customize->add_setting( 'theme_options[contact_email]', array( 'default' => $default['contact_email'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_email', ) ); $wp_customize->add_control( 'theme_options[contact_email]', array( 'label' => __( 'Contact Email', 'business-buzz' ), 'section' => 'section_header', 'type' => 'text', 'priority' => 100, ) ); // Setting show_social_in_header. $wp_customize->add_setting( 'theme_options[show_social_in_header]', array( 'default' => $default['show_social_in_header'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_social_in_header]', array( 'label' => __( 'Enable Social Icons', 'business-buzz' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); $wp_customize->add_setting( 'theme_options[show_search_in_header]', array( 'default' => $default['show_search_in_header'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_search_in_header]', array( 'label' => esc_html__( 'Enable Search Form', 'business-buzz' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Layout Section. $wp_customize->add_section( 'section_layout', array( 'title' => esc_html__( 'Layout Options', 'business-buzz' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); // Setting global_layout. $wp_customize->add_setting( 'theme_options[global_layout]', array( 'default' => $default['global_layout'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[global_layout]', array( 'label' => esc_html__( 'Global Layout', 'business-buzz' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => business_buzz_get_global_layout_options(), 'priority' => 100, ) ); // Setting archive_layout. $wp_customize->add_setting( 'theme_options[archive_layout]', array( 'default' => $default['archive_layout'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[archive_layout]', array( 'label' => esc_html__( 'Archive Layout', 'business-buzz' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => business_buzz_get_archive_layout_options(), 'priority' => 100, ) ); // Footer Section. $wp_customize->add_section( 'section_footer', array( 'title' => esc_html__( 'Footer Options', 'business-buzz' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); // Setting copyright_text. $wp_customize->add_setting( 'theme_options[copyright_text]', array( 'default' => $default['copyright_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[copyright_text]', array( 'label' => esc_html__( 'Copyright Text', 'business-buzz' ), 'section' => 'section_footer', 'type' => 'text', 'priority' => 100, ) ); // Blog Section. $wp_customize->add_section( 'section_blog', array( 'title' => esc_html__( 'Blog Options', 'business-buzz' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); // Setting excerpt_length. $wp_customize->add_setting( 'theme_options[excerpt_length]', array( 'default' => $default['excerpt_length'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'business_buzz_sanitize_positive_integer', ) ); $wp_customize->add_control( 'theme_options[excerpt_length]', array( 'label' => esc_html__( 'Excerpt Length', 'business-buzz' ), 'description' => esc_html__( 'in words', 'business-buzz' ), 'section' => 'section_blog', 'type' => 'number', 'priority' => 100, 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 60px;' ), ) ); // Setting read_more_text. $wp_customize->add_setting( 'theme_options[read_more_text]', array( 'default' => $default['read_more_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[read_more_text]', array( 'label' => esc_html__( 'Read More Text', 'business-buzz' ), 'section' => 'section_blog', 'type' => 'text', 'priority' => 100, ) );