add_section( 'archive_options', array( 'title' => __( 'Archive Post Options', 'blogmarks' ), 'panel' => 'blog_options_panel', ) ); /* Archive Style */ $wp_customize->add_setting( 'archive_style', array( 'default' => $theme_options_defaults['archive_style'], 'sanitize_callback' => 'blogmarks_sanitize_radio', ) ); $wp_customize->add_control( new Blogmarks_Radio_Image_Control( $wp_customize, 'archive_style', array( 'label' => __( 'Archive Layout', 'blogmarks' ), 'section' => 'archive_options', 'choices' => blogmarks_get_archive_layouts(), ) ) ); /*Pagination Style*/ $wp_customize->add_setting( 'pagination_type', array( 'default' => $theme_options_defaults['pagination_type'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'pagination_type', array( 'label' => __( 'Pagination Style', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => array( 'default' => __( 'Default (Older / Newer Post)', 'blogmarks' ), 'none' => __( 'None', 'blogmarks' ), 'numeric' => __( 'Numeric', 'blogmarks' ), 'button_click_load' => __( 'Load more post on click', 'blogmarks' ), 'infinite_scroll_load' => __( 'Load more posts on scroll', 'blogmarks' ), ), ) ); // Center pagination. $wp_customize->add_setting( 'center_aligned_pagination', array( 'default' => $theme_options_defaults['center_aligned_pagination'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'center_aligned_pagination', array( 'label' => __( 'Pagination Aligned at the Center', 'blogmarks' ), 'section' => 'archive_options', ) ) ); /*Pagination Style*/ $wp_customize->add_setting( 'archive_image_size', array( 'default' => $theme_options_defaults['archive_image_size'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_image_size', array( 'label' => __( 'Archive Image Size', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => array( 'full' => __('Full', 'blogmarks'), 'large' => __('Large', 'blogmarks'), 'medium_large' => __('Medium Large', 'blogmarks'), 'medium' => __('Medium', 'blogmarks'), ), ) ); $wp_customize->add_setting( 'archive_title_font_size', array( 'default' => $theme_options_defaults['archive_title_font_size'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_title_font_size', array( 'label' => __( 'Archive Title Font Size', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => array( 'small' => __( 'Small', 'blogmarks' ), 'medium' => __( 'Medium', 'blogmarks' ), 'big' => __( 'Big', 'blogmarks' ), 'large' => __( 'Large', 'blogmarks' ), ), ) ); /* Archive Meta */ $wp_customize->add_setting( 'archive_post_meta', array( 'default' => $theme_options_defaults['archive_post_meta'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox_multiple', ) ); $wp_customize->add_control( new Blogmarks_Checkbox_Multiple( $wp_customize, 'archive_post_meta', array( 'label' => __( 'Archive Metadata', 'blogmarks' ), 'description' => __( 'Select the metadata you wish to appear on archive listings. Please note that certain metadata values may not display on the front end depending on the archive style or post formats used.', 'blogmarks' ), 'section' => 'archive_options', 'choices' => array( 'author' => __( 'Author', 'blogmarks' ), 'read_time' => __( 'Post Read Time', 'blogmarks' ), 'date' => __( 'Date', 'blogmarks' ), 'comment' => __( 'Comment', 'blogmarks' ), 'category' => __( 'Category', 'blogmarks' ), 'tags' => __( 'Tags', 'blogmarks' ), ), ) ) ); // Show Post Meta Icon. $wp_customize->add_setting( 'show_archive_post_meta_icon', array( 'default' => $theme_options_defaults['show_archive_post_meta_icon'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'show_archive_post_meta_icon', array( 'label' => __( 'Show Post Meta Icon', 'blogmarks' ), 'description' => __( 'Some Icons may show up regardless to provide better info.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Archive Post Date Format. $wp_customize->add_setting( 'archive_date_format', array( 'default' => $theme_options_defaults['archive_date_format'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_date_format', array( 'label' => __( 'Date Format', 'blogmarks' ), 'description' => __( 'Make sure to enable Date post meta from above for this to work.', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => array( 'format_1' => __( 'Times Ago', 'blogmarks' ), 'format_2' => __( 'Default Format', 'blogmarks' ), ), ) ); // Show Archive Post author image. $wp_customize->add_setting( 'enable_archive_author_image', array( 'default' => $theme_options_defaults['enable_archive_author_image'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'enable_archive_author_image', array( 'label' => __( 'Show Author Image', 'blogmarks' ), 'description' => __( 'Make sure to enable Author post meta from above for this to work.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Show Archive Category Label. $wp_customize->add_setting( 'enable_archive_cat_label', array( 'default' => $theme_options_defaults['enable_archive_cat_label'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'enable_archive_cat_label', array( 'label' => __( 'Show Category Label', 'blogmarks' ), 'description' => __( 'Make sure to enable Category post meta from above for this to work.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Archive Category Color Display. $wp_customize->add_setting( 'archive_category_color_display', array( 'default' => $theme_options_defaults['archive_category_color_display'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_category_color_display', array( 'label' => __( 'Archive Category Color Display', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => blogmarks_get_category_color_display(), ) ); /* Category Style in Archive Page*/ $wp_customize->add_setting( 'archive_category_style', array( 'default' => $theme_options_defaults['archive_category_style'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_category_style', array( 'label' => __( 'Archive Category Style', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => blogmarks_get_category_styles(), ) ); // No of Archive Categories. $wp_customize->add_setting( 'archive_category_limit', array( 'default' => $theme_options_defaults['archive_category_limit'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'archive_category_limit', array( 'label' => __( 'Limit Categories To Display', 'blogmarks' ), 'description' => __( 'Use 0 for no limit.', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'number', ) ); // Archive Category Position. $wp_customize->add_setting( 'archive_category_position', array( 'default' => $theme_options_defaults['archive_category_position'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_category_position', array( 'label' => __( 'Archive Category Position', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => array( 'before_title' => __( 'Before Title', 'blogmarks' ), 'after_excerpt' => __( 'After Excerpt', 'blogmarks' ), ), ) ); // Show Archive Tag Label. $wp_customize->add_setting( 'enable_archive_tag_label', array( 'default' => $theme_options_defaults['enable_archive_tag_label'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'enable_archive_tag_label', array( 'label' => __( 'Show Tag Label', 'blogmarks' ), 'description' => __( 'Make sure to enable Tags post meta from above for this to work.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); /* Tag Style in Archive Page*/ $wp_customize->add_setting( 'archive_tag_style', array( 'default' => $theme_options_defaults['archive_tag_style'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_tag_style', array( 'label' => __( 'Archive Tag Style', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => blogmarks_get_tag_styles(), ) ); // No of Archive Tags. $wp_customize->add_setting( 'archive_tag_limit', array( 'default' => $theme_options_defaults['archive_tag_limit'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'archive_tag_limit', array( 'label' => __( 'Limit Tags To Display', 'blogmarks' ), 'description' => __( 'Use 0 for no limit.', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'number', ) ); // Show Post Format Icon. $wp_customize->add_setting( 'show_archive_post_format_icon', array( 'default' => $theme_options_defaults['show_archive_post_format_icon'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'show_archive_post_format_icon', array( 'label' => __( 'Show Post Format Icon', 'blogmarks' ), 'description' => __( 'Will not display on certain archive styles.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Archive Posts Title Limit. $wp_customize->add_setting( 'archive_posts_title_limit', array( 'default' => '', 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_posts_title_limit', array( 'label' => __( 'Title Line Limit', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => blogmarks_get_title_limit_choices(), ) ); // Show Excerpt. $wp_customize->add_setting( 'show_archive_excerpt', array( 'default' => $theme_options_defaults['show_archive_excerpt'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'show_archive_excerpt', array( 'label' => __( 'Show Excerpt', 'blogmarks' ), 'description' => __( 'Will not display on certain post formats and archive styles.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Show Read More. $wp_customize->add_setting( 'show_archive_read_more', array( 'default' => $theme_options_defaults['show_archive_read_more'], 'sanitize_callback' => 'blogmarks_sanitize_checkbox', ) ); $wp_customize->add_control( new Blogmarks_Toggle_Control( $wp_customize, 'show_archive_read_more', array( 'label' => __( 'Show Read More', 'blogmarks' ), 'description' => __( 'Will not display on certain post formats and archive styles.', 'blogmarks' ), 'section' => 'archive_options', ) ) ); // Read more stlye. $wp_customize->add_setting( 'archive_read_more_style', array( 'default' => $theme_options_defaults['archive_read_more_style'], 'sanitize_callback' => 'blogmarks_sanitize_select', ) ); $wp_customize->add_control( 'archive_read_more_style', array( 'label' => __( 'Read More Style', 'blogmarks' ), 'section' => 'archive_options', 'type' => 'select', 'choices' => blogmarks_get_read_more_styles(), 'active_callback' => 'blogmarks_is_archive_read_more_enabled', ) );