add_section( 'beauty-studio-design-blog-layout-option', array( 'priority' => 30, 'capability' => 'edit_theme_options', 'title' => esc_html__( 'Default Blog/Archive Layout', 'beauty-studio' ), 'panel' => 'beauty-studio-design-panel' ) ); /*blog layout*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-img-size]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-img-size'], 'sanitize_callback' => 'beauty_studio_sanitize_select' ) ); $choices = beauty_studio_get_image_sizes_options(1); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-img-size]', array( 'choices' => $choices, 'label' => esc_html__( 'Blog/Archive Feature Image Size', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-img-size]', 'type' => 'select' ) ); /*blog content from*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-content-from]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-content-from'], 'sanitize_callback' => 'beauty_studio_sanitize_select' ) ); $choices = beauty_studio_blog_archive_content_from(); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-content-from]', array( 'choices' => $choices, 'label' => esc_html__( 'Blog/Archive Content From', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-content-from]', 'type' => 'select' ) ); /*Excerpt Length*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-excerpt-length]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-excerpt-length'], 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-excerpt-length]', array( 'label' => esc_html__( 'Except Length', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-excerpt-length]', 'type' => 'number', 'active_callback' => 'beauty_studio_active_callback_content_from_excerpt' ) ); /*Read More Text*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-more-text]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-more-text'], 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-more-text]', array( 'label' => esc_html__( 'Read More Text', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-more-text]', 'type' => 'text' ) ); /*Exclude Categories In Blog Page*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-exclude-categories]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-exclude-categories'], 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-exclude-categories]', array( 'label' => esc_html__( 'Exclude Categories In Blog Page', 'beauty-studio' ), 'description'=> esc_html__( 'Enter categories ids in comma separated eg: 3,5,7,95. For including all categories left blank', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-exclude-categories]', 'type' => 'text' ) ); /*show date*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-date]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-show-date'], 'sanitize_callback' => 'beauty_studio_sanitize_checkbox', ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-date]', array( 'label' => esc_html__( 'Show Date', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-show-date]', 'type' => 'checkbox' ) ); /*show author*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-author]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-show-author'], 'sanitize_callback' => 'beauty_studio_sanitize_checkbox' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-author]', array( 'label' => esc_html__( 'Show Author', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-show-author]', 'type' => 'checkbox' ) ); /*show cats*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-cats]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-show-cats'], 'sanitize_callback' => 'beauty_studio_sanitize_checkbox' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-cats]', array( 'label' => esc_html__( 'Show Cats', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-show-cats]', 'type' => 'checkbox' ) ); /*show tag*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-tags]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-show-tags'], 'sanitize_callback' => 'beauty_studio_sanitize_checkbox' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-tags]', array( 'label' => esc_html__( 'Show Tags', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-show-tags]', 'type' => 'checkbox' ) ); /*show comments*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-comments]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-blog-archive-show-comments'], 'sanitize_callback' => 'beauty_studio_sanitize_checkbox' ) ); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-blog-archive-show-comments]', array( 'label' => esc_html__( 'Show Comments', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-blog-archive-show-comments]', 'type' => 'checkbox' ) ); /*Pagination Options*/ $wp_customize->add_setting( 'beauty_studio_theme_options[beauty-studio-pagination-option]', array( 'capability' => 'edit_theme_options', 'default' => $defaults['beauty-studio-pagination-option'], 'sanitize_callback' => 'beauty_studio_sanitize_select' ) ); $choices = beauty_studio_pagination_options(); $wp_customize->add_control( 'beauty_studio_theme_options[beauty-studio-pagination-option]', array( 'choices' => $choices, 'label' => esc_html__( 'Pagination Options', 'beauty-studio' ), 'description' => esc_html__( 'Blog and Archive Pages Pagination', 'beauty-studio' ), 'section' => 'beauty-studio-design-blog-layout-option', 'settings' => 'beauty_studio_theme_options[beauty-studio-pagination-option]', 'type' => 'select' ) );