public function sanitize_email_type( $value ) {
		$value = trim( (string) $value );
		$new_value = '';

		if ( in_array( $value, [ 'html', 'text' ], true ) ) {
			$new_value = $value;
		}

		if ( ! $new_value ) {
			add_settings_error(
				'soter_email_type',
				'invalid_soter_email_type',
				sprintf(
					'Email type must be one of "text" or "html" - "%s" given.',
					esc_html( $value )
				)
			);

			return $this->email_type;
		}

		return $new_value;
	}
public function sanitize_email_type( $value ) {
		$value = trim( (string) $value );
		$new_value = '';

		if ( in_array( $value, [ 'html', 'text' ], true ) ) {
			$new_value = $value;
		}

		if ( ! $new_value ) {
			add_settings_error(
				'soter_email_type',
				'invalid_soter_email_type',
				sprintf(
					'Email type must be one of "text" or "html" - "%s" given.',
					esc_html( $value )
				)
			);

			return $this->email_type;
		}

		return $new_value;
	}
public function sanitize_email_type ( $ value ) { $ value = trim ( ( string ) $ value ) ; $ new_value = '' ; if ( in_array ( $ value , [ 'html' , 'text' ] , true ) ) { $ new_value = $ value ; } if ( ! $ new_value ) { add_settings_error ( 'soter_email_type' , 'invalid_soter_email_type' , sprintf ( 'Email type must be one of "text" or "html" - "%s" given.' , esc_html ( $ value ) ) ) ; return $ this -> email_type ; } return $ new_value ; }
Sanitize the email type setting.

@param  string $value The value provided by the user.

@return string
Sanitize the email type setting .