manager->get_control( $blook_setting->id )->choices; // If the input is a valid key, return it; otherwise, return the default. return ( array_key_exists( $blook_input, $choices ) ? $blook_input : $blook_setting->default ); } endif; if ( ! function_exists( 'blook_sanitize_checkbox' ) ) : /** * Sanitize checkbox. */ function blook_sanitize_checkbox( $blook_checked ) { return ( ( isset( $blook_checked ) && true === $blook_checked ) ? true : false ); } endif;