Changeset 13828
- Timestamp:
- 06/17/2024 09:45:58 AM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/templates/settings-edit.php
r12660 r13828 44 44 $deepl_key = trim( gp_array_get( $gp_default_sort, 'deepl_api_key' ) ); 45 45 $deepl_response = null; 46 47 48 49 46 50 if ( $deepl_key ) { 47 51 $deepl_response = wp_remote_get( 48 'https://api-free.deepl.com/v2/usage',52 , 49 53 array( 50 54 'timeout' => 4, … … 56 60 ); 57 61 } 62 58 63 $deepl_response_code = wp_remote_retrieve_response_code( $deepl_response ); 59 64 ?> … … 181 186 </th> 182 187 </tr> 188 189 190 191 183 192 <tr> 184 193 <th><label for="default_sort[deepl_api_key]"> 185 <?php esc_html_e( 'DeepL FreeAPI Key', 'glotpress' ); ?>194 <?php esc_html_e( 'DeepL API Key', 'glotpress' ); ?> 186 195 </label> 187 196 <?php … … 222 231 if ( 200 != $deepl_response_code ) { 223 232 echo '<small style="color:red;">'; 224 esc_html_e( 'Your DeepL FreeAPI Key is not correct.', 'glotpress' );233 esc_html_e( 'Your DeepL API Key is not correct.', 'glotpress' ); 225 234 } else { 226 235 echo '<small style="color:green;">'; 227 esc_html_e( 'Your DeepL FreeAPI Key is correct.', 'glotpress' );236 esc_html_e( 'Your DeepL API Key is correct.', 'glotpress' ); 228 237 } 229 238 echo '</small>';
Note: See TracChangeset
for help on using the changeset viewer.