Skip to content

Commit 2542b7f

Browse files
committed
remove legacy settings
1 parent 13c694b commit 2542b7f

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

includes/Classifai/Providers/Azure/Language.php

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -44,62 +44,6 @@ public function __construct( $feature_instance = null ) {
4444
$this->feature_instance = $feature_instance;
4545
}
4646

47-
/**
48-
* This method will be called by the feature to render the fields
49-
* required by the provider, such as API key, endpoint URL, etc.
50-
*
51-
* This should also register settings that are required for the feature
52-
* to work.
53-
*/
54-
public function render_provider_fields() {
55-
$settings = $this->feature_instance->get_settings( static::ID );
56-
57-
$this->add_api_key_field();
58-
59-
add_settings_field(
60-
static::ID . '_endpoint_url',
61-
esc_html__( 'Endpoint URL', 'classifai' ),
62-
[ $this->feature_instance, 'render_input' ],
63-
$this->feature_instance->get_option_name(),
64-
$this->feature_instance->get_option_name() . '_section',
65-
[
66-
'option_index' => static::ID,
67-
'label_for' => 'endpoint_url',
68-
'input_type' => 'text',
69-
'default_value' => $settings['endpoint_url'],
70-
'class' => 'classifai-provider-field hidden provider-scope-' . static::ID, // Important to add this.
71-
'description' => sprintf(
72-
wp_kses(
73-
// translators: 1 - link to create a Language resource.
74-
__( 'Azure Cognitive Service Language Endpoint, <a href="%1$s" target="_blank">create a Language resource</a> in the Azure portal to get your key and endpoint.', 'classifai' ),
75-
array(
76-
'a' => array(
77-
'href' => array(),
78-
'target' => array(),
79-
),
80-
)
81-
),
82-
esc_url( 'https://portal.azure.com/#home' )
83-
),
84-
]
85-
);
86-
}
87-
88-
/**
89-
* Returns the default settings for this provider.
90-
*
91-
* @return array
92-
*/
93-
public function get_default_provider_settings(): array {
94-
$common_settings = [
95-
'api_key' => '',
96-
'endpoint_url' => '',
97-
'authenticated' => false,
98-
];
99-
100-
return $common_settings;
101-
}
102-
10347
/**
10448
* Sanitize the settings for this provider.
10549
*

0 commit comments

Comments
 (0)