selective_refresh ) ? 'postMessage' : 'refresh'; // Theme options Panel // $wp_customize->add_panel( 'theme_options', array( 'priority' => 81, 'capability' => 'edit_theme_options', 'title' => __('Theme Options', 'aqwa'), ) ); // Excerpt Settings $wp_customize->add_section( 'excerpt_settings', array( 'title' => esc_html__( 'Excerpt Settings', 'aqwa' ), 'panel' => 'theme_options', 'priority' => 3, ) ); // Excerpt $wp_customize->add_setting( 'aqwa_display_excerpt_or_full_post', array( 'capability' => 'edit_theme_options', 'default' => 'excerpt', 'sanitize_callback' => function( $value ) { return 'excerpt' === $value || 'full' === $value ? $value : 'excerpt'; }, ) ); // Excerpt $wp_customize->add_control( 'aqwa_display_excerpt_or_full_post', array( 'type' => 'radio', 'section' => 'excerpt_settings', 'label' => esc_html__( 'On Archive Pages, posts show:', 'aqwa' ), 'choices' => array( 'excerpt' => esc_html__( 'Summary', 'aqwa' ), 'full' => esc_html__( 'Full text', 'aqwa' ), ), ) ); } public static function sanitize_text( $text ) { return wp_filter_nohtml_kses( $text ); } public static function sanitize_checkbox( $checked = null ) { return (bool) isset( $checked ) && true === $checked; } } new Aqwa_Theme_Option(); }