add_setting( 'theme_options[site_tagline_style]', array( 'default' => $default_options['site_tagline_style'], 'sanitize_callback' => 'blog_tale_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[site_tagline_style]', array( 'label' => __( 'Site Tagline Style', 'blog-tale' ), 'section' => 'title_tagline', 'type' => 'select', 'choices' => array( 'style_1' => __('Style 1', 'blog-tale'), 'style_2' => __('Style 2', 'blog-tale'), 'style_3' => __('Style 3', 'blog-tale'), ), ) ); /**/ /*Site title text size*/ $wp_customize->add_setting( 'theme_options[site_title_text_size]', array( 'default' => $default_options['site_title_text_size'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'theme_options[site_title_text_size]', array( 'label' => __('Site Title Text Size', 'blog-tale'), 'section' => 'title_tagline', 'type' => 'number', 'input_attrs' => array('min' => 1, 'max' => 100, 'style' => 'width: 150px;'), ) ); $wp_customize->add_setting( 'theme_options[site_tagline_text_size]', array( 'default' => $default_options['site_tagline_text_size'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'theme_options[site_tagline_text_size]', array( 'label' => __('Site Tagline Text Size', 'blog-tale'), 'section' => 'title_tagline', 'type' => 'number', 'input_attrs' => array('min' => 1, 'max' => 100, 'style' => 'width: 150px;'), ) ); /**/ /*Add Theme Options Panel.*/ $wp_customize->add_panel( 'theme_option_panel', array( 'title' => __( 'Theme Options', 'blog-tale' ), 'description' => __( 'Contains all theme settings', 'blog-tale') ) ); /**/ /* ========== Preloader Section. ==========*/ $wp_customize->add_section( 'preloader_options', array( 'title' => __( 'Preloader Options', 'blog-tale' ), 'panel' => 'theme_option_panel', ) ); /*Show Preloader*/ $wp_customize->add_setting( 'theme_options[show_preloader]', array( 'default' => $default_options['show_preloader'], 'sanitize_callback' => 'blog_tale_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[show_preloader]', array( 'label' => __( 'Show Preloader', 'blog-tale' ), 'section' => 'preloader_options', 'type' => 'checkbox', ) ); /* ========== Preloader Section Close========== */ /* ========== Breadcrumb Section ========== */ $wp_customize->add_section( 'breadcrumb_options', array( 'title' => __( 'Breadcrumb Options', 'blog-tale' ), 'panel' => 'theme_option_panel', ) ); /*Show Breadcrumb*/ $wp_customize->add_setting( 'theme_options[enable_breadcrumb]', array( 'default' => $default_options['enable_breadcrumb'], 'sanitize_callback' => 'blog_tale_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[enable_breadcrumb]', array( 'label' => __( 'Enable Breadcrumb', 'blog-tale' ), 'section' => 'breadcrumb_options', 'type' => 'checkbox', ) ); /* ========== Breadcrumb Section Close ========== */ /* ========== Sidebar Section ========== */ $wp_customize->add_section( 'sidebar_options', array( 'title' => __( 'Sidebar Options', 'blog-tale' ), 'panel' => 'theme_option_panel', ) ); /* Global Layout*/ $wp_customize->add_setting( 'theme_options[global_sidebar_layout]', array( 'default' => $default_options['global_sidebar_layout'], 'sanitize_callback' => 'blog_tale_sanitize_radio', ) ); $wp_customize->add_control( new Blog_Tale_Radio_Image_Control( $wp_customize, 'theme_options[global_sidebar_layout]', array( 'label' => __( 'Global Sidebar Layout', 'blog-tale' ), 'section' => 'sidebar_options', 'choices' => blog_tale_get_general_layouts() ) ) ); /* Sticky enable/disable */ $wp_customize->add_setting( 'theme_options[sticky_sidebar]', array( 'default' => $default_options['sticky_sidebar'], 'sanitize_callback' => 'blog_tale_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[sticky_sidebar]', array( 'label' => __( 'Enable Sticky Sidebar', 'blog-tale' ), 'section' => 'sidebar_options', 'type' => 'checkbox', ) ); /* ========== Sidebar Section Close ========== */ /* ========== Excerpt Section ========== */ $wp_customize->add_section( 'excerpt_options', array( 'title' => __( 'Excerpt Options', 'blog-tale' ), 'panel' => 'theme_option_panel', ) ); /* Excerpt Length */ $wp_customize->add_setting( 'theme_options[excerpt_length]', array( 'default' => $default_options['excerpt_length'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'theme_options[excerpt_length]', array( 'label' => __( 'Max Excerpt Length', 'blog-tale' ), 'description' => __( 'Remember this will affect other areas that shows excerpt too. So if you have excerpt with more length on other areas but is not working on front-end, be sure to increase the length here too.', 'blog-tale'), 'section' => 'excerpt_options', 'type' => 'number', ) ); /* Excerpt Read More Text */ $wp_customize->add_setting( 'theme_options[excerpt_read_more_text]', array( 'default' => $default_options['excerpt_read_more_text'], 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( 'theme_options[excerpt_read_more_text]', array( 'label' => __( 'Read More Text', 'blog-tale' ), 'section' => 'excerpt_options', 'type' => 'text', ) ); /* ========== Excerpt Section Close ========== */