add_panel( 'theme_option_panel', array( 'title' => __( 'Theme Options', 'bookstore-exhibition' ), 'priority' => 100, 'capability' => 'edit_theme_options', ) ); // General Option. $wp_customize->add_section( 'section_general_option', array( 'title' => __( 'General Options', 'bookstore-exhibition' ), 'priority' => 100, 'capability' => 'edit_theme_options', 'panel' => 'theme_option_panel', ) ); // Setting show scroll to top. $wp_customize->add_setting( 'theme_options[show_scroll_to_top]', array( 'default' => $default['show_scroll_to_top'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_scroll_to_top]', array( 'label' => __( 'Show Scroll To Top', 'bookstore-exhibition' ), 'section' => 'section_general_option', 'type' => 'checkbox', 'priority' => 100, ) ); // Header Section. $wp_customize->add_section( 'section_header', array( 'title' => __( 'Header Options', 'bookstore-exhibition' ), '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' => 'bookstore_exhibition_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_title]', array( 'label' => __( 'Show Site Title', 'bookstore-exhibition' ), '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' => 'bookstore_exhibition_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_tagline]', array( 'label' => __( 'Show Tagline', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting show_header_top. $wp_customize->add_setting( 'theme_options[show_header_top]', array( 'default' => $default['show_header_top'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_header_top]', array( 'label' => __( 'Show Header Top', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting show_social_icon. $wp_customize->add_setting( 'theme_options[show_social_icon]', array( 'default' => $default['show_social_icon'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_social_icon]', array( 'label' => __( 'Show Social Icon', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'checkbox', 'priority' => 100, ) ); // Setting announcement_text $wp_customize->add_setting( 'theme_options[discount_text]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'theme_options[discount_text]', array( 'label' => __( 'Add Announcement Text', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'text', 'priority' => 100, ) ); // Setting announcement link $wp_customize->add_setting( 'theme_options[discount_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[discount_link]', array( 'label' => __( 'Add Announcement Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Setting facebook link $wp_customize->add_setting( 'theme_options[facebook_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[facebook_link]', array( 'label' => __( 'Add Facebook Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Setting twitter link $wp_customize->add_setting( 'theme_options[twitter_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[twitter_link]', array( 'label' => __( 'Add Twitter Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Setting watsapp link $wp_customize->add_setting( 'theme_options[watsapp_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[watsapp_link]', array( 'label' => __( 'Add Watsapp Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Setting Instagram link $wp_customize->add_setting( 'theme_options[instagram_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[instagram_link]', array( 'label' => __( 'Add Instagram Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Setting Linkdin link $wp_customize->add_setting( 'theme_options[linkdin_link]', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'theme_options[linkdin_link]', array( 'label' => __( 'Add Linkdin Link', 'bookstore-exhibition' ), 'section' => 'section_header', 'type' => 'url', 'priority' => 100, ) ); // Layout Section. $wp_customize->add_section( 'section_layout', array( 'title' => __( 'Layout Options', 'bookstore-exhibition' ), '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' => 'bookstore_exhibition_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[global_layout]', array( 'label' => __( 'Global Layout', 'bookstore-exhibition' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => bookstore_exhibition_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' => 'bookstore_exhibition_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[archive_layout]', array( 'label' => __( 'Archive Layout', 'bookstore-exhibition' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => bookstore_exhibition_get_archive_layout_options(), 'priority' => 100, ) ); // Setting archive_image. $wp_customize->add_setting( 'theme_options[archive_image]', array( 'default' => $default['archive_image'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[archive_image]', array( 'label' => __( 'Image in Archive', 'bookstore-exhibition' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => bookstore_exhibition_get_image_sizes_options( true, array( 'disable', 'thumbnail', 'medium', 'large' ), false ), 'priority' => 100, ) ); // Setting archive_image_alignment. $wp_customize->add_setting( 'theme_options[archive_image_alignment]', array( 'default' => $default['archive_image_alignment'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[archive_image_alignment]', array( 'label' => __( 'Image Alignment in Archive', 'bookstore-exhibition' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => bookstore_exhibition_get_image_alignment_options(), 'priority' => 100, 'active_callback' => 'bookstore_exhibition_is_image_in_archive_active', ) ); // Setting single_image. $wp_customize->add_setting( 'theme_options[single_image]', array( 'default' => $default['single_image'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bookstore_exhibition_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[single_image]', array( 'label' => __( 'Image in Single Post/Page', 'bookstore-exhibition' ), 'section' => 'section_layout', 'type' => 'select', 'choices' => bookstore_exhibition_get_image_sizes_options( true, array( 'disable', 'large' ), false ), 'priority' => 100, ) ); // Footer Section. $wp_customize->add_section( 'section_footer', array( 'title' => __( 'Footer Options', 'bookstore-exhibition' ), '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' => 'bookstore_exhibition_sanitize_textarea_content', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'theme_options[copyright_text]', array( 'label' => __( 'Copyright Text', 'bookstore-exhibition' ), 'section' => 'section_footer', 'type' => 'text', 'priority' => 100, ) );