remove_control( "header_textcolor" ); // Archive Cards Version $wp_customize->add_setting( 'archive_card_version', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( $this, 'sanitize_checkbox' ), 'default' => FALSE ) ); $wp_customize->add_control( 'archive_card_version', array( 'type' => 'checkbox', 'section' => 'kadence_customizer_post_archive', // Add a default or your own section 'label' => esc_html__( 'Card Stack Style', 'blockfold' ), ) ); $wp_customize->add_setting( 'archive_title_decorator', array( 'capability' => 'edit_theme_options', 'sanitize_callback' => array( $this, 'sanitize_checkbox' ), 'default' => FALSE ) ); $wp_customize->add_control( 'archive_title_decorator', array( 'type' => 'checkbox', 'section' => 'kadence_customizer_post_archive_design', // Add a default or your own section 'label' => esc_html__( 'Archive Title Decorator', 'blockfold' ), ) ); } /** * Select Sanitization * * @param $input * @param $setting * * @return string */ function sanitize_select( $input, $setting ) { //input must be a slug: lowercase alphanumeric characters, dashes and underscores are allowed only $input = sanitize_key( $input ); //get the list of possible select options $choices = $setting->manager->get_control( $setting->id )->choices; //return input if valid or return default option return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); } /** * Sanitize Checkbox * * @param $checked * * @return bool */ function sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && TRUE == $checked ) ? TRUE : FALSE ); } } }