add_section( 'single_post_options' , array( 'title' => __( 'Single Post Options', 'aytias' ), 'panel' => 'aytias_option_panel', ) ); /*Posts Navigation Style*/ $wp_customize->add_setting( 'aytias_options[posts_navigation_style]', array( 'default' => $default_options['posts_navigation_style'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[posts_navigation_style]', array( 'label' => __( 'Posts Navigation Style', 'aytias' ), 'section' => 'single_post_options', 'type' => 'select', 'choices' => array( 'style_1' => esc_html__( 'Style 1', 'aytias' ), 'style_2' => esc_html__( 'Style 2', 'aytias' ), ), ) ); /* Post Meta */ $wp_customize->add_setting( 'aytias_options[single_post_meta]', array( 'default' => $default_options['single_post_meta'], 'sanitize_callback' => 'aytias_sanitize_checkbox_multiple', ) ); $wp_customize->add_control( new Aytias_Checkbox_Multiple( $wp_customize, 'aytias_options[single_post_meta]', array( 'label' => __( 'Single Post Meta', 'aytias' ), 'description' => __( 'Choose the post meta you want to be displayed on post detail page', 'aytias' ), 'section' => 'single_post_options', 'choices' => array( 'author' => __( 'Author', 'aytias' ), 'read_time' => __( 'Post Read Time', 'aytias' ), 'date' => __( 'Date', 'aytias' ), 'comment' => __( 'Comment', 'aytias' ), 'category' => __( 'Category', 'aytias' ), 'tags' => __( 'Tags', 'aytias' ), ) ) ) ); /*Show Author Info Box *-------------------------------*/ $wp_customize->add_setting( 'aytias_options[show_author_info]', array( 'default' => $default_options['show_author_info'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[show_author_info]', array( 'label' => __( 'Show Author Info Box', 'aytias' ), 'section' => 'single_post_options', 'type' => 'checkbox', ) ); /*Show Related Posts *-------------------------------*/ $wp_customize->add_setting( 'aytias_options[show_related_posts]', array( 'default' => $default_options['show_related_posts'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[show_related_posts]', array( 'label' => __( 'Show Related Posts', 'aytias' ), 'section' => 'single_post_options', 'type' => 'checkbox', ) ); /*Related Posts Text.*/ $wp_customize->add_setting( 'aytias_options[related_posts_text]', array( 'default' => $default_options['related_posts_text'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aytias_options[related_posts_text]', array( 'label' => __( 'Related Posts Text', 'aytias' ), 'section' => 'single_post_options', 'type' => 'text', 'active_callback' => 'aytias_is_related_posts_enabled', ) ); /* Number of Related Posts */ $wp_customize->add_setting( 'aytias_options[no_of_related_posts]', array( 'default' => $default_options['no_of_related_posts'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'aytias_options[no_of_related_posts]', array( 'label' => __( 'Number of Related Posts', 'aytias' ), 'section' => 'single_post_options', 'type' => 'number', 'active_callback' => 'aytias_is_related_posts_enabled', ) ); /*Related Posts Orderby*/ $wp_customize->add_setting( 'aytias_options[related_posts_orderby]', array( 'default' => $default_options['related_posts_orderby'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[related_posts_orderby]', array( 'label' => __( 'Orderby', 'aytias' ), 'section' => 'single_post_options', 'type' => 'select', 'choices' => array( 'date' => __('Date', 'aytias'), 'id' => __('ID', 'aytias'), 'title' => __('Title', 'aytias'), 'rand' => __('Random', 'aytias'), ), 'active_callback' => 'aytias_is_related_posts_enabled', ) ); /*Related Posts Order*/ $wp_customize->add_setting( 'aytias_options[related_posts_order]', array( 'default' => $default_options['related_posts_order'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[related_posts_order]', array( 'label' => __( 'Order', 'aytias' ), 'section' => 'single_post_options', 'type' => 'select', 'choices' => array( 'asc' => __('ASC', 'aytias'), 'desc' => __('DESC', 'aytias'), ), 'active_callback' => 'aytias_is_related_posts_enabled', ) ); /*Show Author Posts *-----------------------------------------*/ $wp_customize->add_setting( 'aytias_options[show_author_posts]', array( 'default' => $default_options['show_author_posts'], 'sanitize_callback' => 'aytias_sanitize_checkbox', ) ); $wp_customize->add_control( 'aytias_options[show_author_posts]', array( 'label' => __( 'Show Author Posts', 'aytias' ), 'section' => 'single_post_options', 'type' => 'checkbox', ) ); /*Author Posts Text.*/ $wp_customize->add_setting( 'aytias_options[author_posts_text]', array( 'default' => $default_options['author_posts_text'], 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'aytias_options[author_posts_text]', array( 'label' => __( 'Author Posts Text', 'aytias' ), 'section' => 'single_post_options', 'type' => 'text', 'active_callback' => 'aytias_is_author_posts_enabled', ) ); /* Number of Author Posts */ $wp_customize->add_setting( 'aytias_options[no_of_author_posts]', array( 'default' => $default_options['no_of_author_posts'], 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'aytias_options[no_of_author_posts]', array( 'label' => __( 'Number of Author Posts', 'aytias' ), 'section' => 'single_post_options', 'type' => 'number', 'active_callback' => 'aytias_is_author_posts_enabled', ) ); /*Author Posts Orderby*/ $wp_customize->add_setting( 'aytias_options[author_posts_orderby]', array( 'default' => $default_options['author_posts_orderby'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[author_posts_orderby]', array( 'label' => __( 'Orderby', 'aytias' ), 'section' => 'single_post_options', 'type' => 'select', 'choices' => array( 'date' => __('Date', 'aytias'), 'id' => __('ID', 'aytias'), 'title' => __('Title', 'aytias'), 'rand' => __('Random', 'aytias'), ), 'active_callback' => 'aytias_is_author_posts_enabled', ) ); /*Author Posts Order*/ $wp_customize->add_setting( 'aytias_options[author_posts_order]', array( 'default' => $default_options['author_posts_order'], 'sanitize_callback' => 'aytias_sanitize_select', ) ); $wp_customize->add_control( 'aytias_options[author_posts_order]', array( 'label' => __( 'Order', 'aytias' ), 'section' => 'single_post_options', 'type' => 'select', 'choices' => array( 'asc' => __('ASC', 'aytias'), 'desc' => __('DESC', 'aytias'), ), 'active_callback' => 'aytias_is_author_posts_enabled', ) );