add_panel( 'astrad_design_settings_panel', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'Design Settings', 'astrad' ), ) ); /*---------------------------------------------------------------------------------------------------------------*/ /** * Archive Settings * * @since 1.0.0 */ $wp_customize->add_section( 'astrad_archive_settings_section', array( 'title' => esc_html__( 'Archive Page', 'astrad' ), 'panel' => 'astrad_design_settings_panel', 'priority' => 5, ) ); /** * Heding * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_meta_tags_heading', array( 'default' => '', 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control( new astrad_Customizer_Heading( $wp_customize, 'astrad_meta_tags_heading', array( 'label' => esc_html__( 'Content', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'priority' => 5, ) ) ); /** * Switch option for Author name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_author', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_author', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Author', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Author" for post.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Date name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_date', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_date', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Date', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Date" for post.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Featured Image name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_fimage', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_fimage', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Featured Image', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Featured Image" for post.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Category name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_category', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_category', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Category', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Category" for post.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Tags name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_tags', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_tags', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Tags', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Tags" for post.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Heding * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_post_display_heading', array( 'default' => '', 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control( new astrad_Customizer_Heading( $wp_customize, 'astrad_post_display_heading', array( 'label' => esc_html__( 'Display Options', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'priority' => 5, ) ) ); /** * Text field for post excerpt length * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_blog_excerpt_length', array( 'default' => 30, 'sanitize_callback' => 'astrad_sanitize_number_absint' ) ); $wp_customize->add_control( 'astrad_blog_excerpt_length', array( 'type' => 'number', 'label' => esc_html__( 'Post excerpt length( content length )', 'astrad' ), 'description' => esc_html__( 'Enter content length in numbers.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'priority' => 15 ) ); /** * Text field for archive read more * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_archive_read_more_text', array( 'default' => esc_html__( 'Read More', 'astrad' ), 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'astrad_archive_read_more_text', array( 'type' => 'text', 'label' => esc_html__( 'Read More Text', 'astrad' ), 'description' => esc_html__( 'Enter read more button text for archive page.', 'astrad' ), 'section' => 'astrad_archive_settings_section', 'priority' => 15 ) ); /** * Radio field for post content * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_radio_post_content', array( 'capability' => 'edit_theme_options', 'default' => 'excerpt', 'sanitize_callback' => 'astrad_sanitize_radio_option', ) ); $wp_customize->add_control( 'astrad_radio_post_content', array( 'type' => 'radio', 'section' => 'astrad_archive_settings_section', 'priority' => 20, 'label' => esc_html__( 'Content type', 'astrad' ), 'description' => esc_html__( 'Select content type to diplay post text.', 'astrad' ), 'choices' => array( 'full' => esc_html__( 'Full content', 'astrad' ), 'excerpt' => esc_html__( 'Excerpt', 'astrad' ) ), ) ); /** * Radio field for post pagination * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_radio_post_pagination', array( 'capability' => 'edit_theme_options', 'default' => 'pagination', 'sanitize_callback' => 'astrad_sanitize_radio_option', ) ); $wp_customize->add_control( 'astrad_radio_post_pagination', array( 'type' => 'radio', 'section' => 'astrad_archive_settings_section', 'priority' => 20, 'label' => esc_html__( 'Post Pagination', 'astrad' ), 'description' => esc_html__( 'Select pagination for post.', 'astrad' ), 'choices' => array( 'default' => esc_html__( 'default', 'astrad' ), 'pagination' => esc_html__( 'Pagination', 'astrad' ) ), ) ); /*---------------------------------------------------------------------------------------------------------------*/ /** * Archive Settings * * @since 1.0.0 */ $wp_customize->add_section( 'astrad_single_settings_section', array( 'title' => esc_html__( 'Single Post', 'astrad' ), 'panel' => 'astrad_design_settings_panel', 'priority' => 5, ) ); /** * Heding * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_meta_single_heading', array( 'default' => '', 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control( new astrad_Customizer_Heading( $wp_customize, 'astrad_meta_single_heading', array( 'label' => esc_html__( 'Content', 'astrad' ), 'section' => 'astrad_single_settings_section', 'priority' => 5, ) ) ); /** * Switch option for Author name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_author', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_author', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Author', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Author" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Date name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_date', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_date', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Date', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Date" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Featured Image name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_fimage', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_fimage', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Featured Image', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Featured Image" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Category name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_category', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_category', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Category', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Category" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Switch option for Tags name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_tags', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_tags', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Tags', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Tags" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); /** * Heding * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_single_display_heading', array( 'default' => '', 'sanitize_callback' => 'wp_kses', ) ); $wp_customize->add_control( new astrad_Customizer_Heading( $wp_customize, 'astrad_single_display_heading', array( 'label' => esc_html__( 'Display Options', 'astrad' ), 'section' => 'astrad_single_settings_section', 'priority' => 5, ) ) ); /** * Switch option for Post Navigation name * * @since 1.0.0 */ $wp_customize->add_setting( 'astrad_show_single_nav', array( 'default' => 'show', 'sanitize_callback' => 'astrad_sanitize_switch_option', ) ); $wp_customize->add_control( new astrad_Customize_Switch_Control( $wp_customize, 'astrad_show_single_nav', array( 'type' => 'astrad-switch', 'label' => esc_html__( 'Enable Post Navigation', 'astrad' ), 'description' => esc_html__( 'Show/Hide option for "Post Navigation" for post.', 'astrad' ), 'section' => 'astrad_single_settings_section', 'choices' => array( 'show' => esc_html__( 'Show', 'astrad' ), 'hide' => esc_html__( 'Hide', 'astrad' ) ), 'priority' => 5, ) ) ); }