Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing TODO from https://github.com/10up/classifai/issues/260 ComputerVision::reset_settings() #264

Merged
merged 8 commits into from
May 7, 2021
14 changes: 13 additions & 1 deletion includes/Classifai/Providers/Azure/ComputerVision.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,19 @@ public function __construct( $service ) {
* Resets settings for the ComputerVision provider.
*/
public function reset_settings() {
// TODO: Implement reset_settings() method.
$settings = [
'valid' => false,
'url' => '',
'api_key' => '',
'enable_image_captions' => '1',
'enable_image_tagging' => '1',
'enable_smart_cropping' => 'no',
'enable_ocr' => 'no',
'caption_threshold' => 75,
'tag_threshold' => 70,
'image_tag_taxonomy' => 'classifai-image-tags',
];
update_option( $this->get_option_name(), $settings );
}

/**
Expand Down