Plugin Directory

Changeset 3482591


Ignore:
Timestamp:
03/14/2026 03:03:30 PM (2 weeks ago)
Author:
John Dagelmore
Message:

2.26 trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gptranslate/trunk/settings.php

    r3474047 r3482591  
    4848            </td>
    4949         </tr>
     50         <tr class='google_translate_method_ctrl'>
     51            <th scope='row'><label for='google_translate_method'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_GOOGLE_TRANSLATE_METHOD')); ?></label></th>
     52            <td>
     53               <select name="gptranslate_options[google_translate_method]" id='google_translate_method'>
     54                  <option value='0'<?php selected($options["google_translate_method"] ?? "0", "0"); ?>><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_GOOGLE_TRANSLATE_METHOD_STANDARD')); ?></option>
     55                  <option value='1'<?php selected($options["google_translate_method"] ?? "0", "1"); ?>><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_GOOGLE_TRANSLATE_METHOD_TRANSLATEHTML')); ?></option>
     56               </select>
     57               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_GOOGLE_TRANSLATE_METHOD_DESC')); ?></p>
     58            </td>
     59         </tr>
    5060         <tr>
    5161            <th scope='row'><label for='chatgpt_apikey'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_CHATGPT_APIKEY')); ?></label></th>
    5262            <td>
    53                <input type='text' name="gptranslate_options[chatgpt_apikey]" id='chatgpt_apikey' value='<?php echo esc_attr($options["chatgpt_apikey"] ?? ""); ?>' class='regular-text chatgpt_ctrl large-text' />
     63               <div class="gpt-apikey-wrap">
     64                  <input type='password' name="gptranslate_options[chatgpt_apikey]" id='chatgpt_apikey' value='<?php echo esc_attr($options["chatgpt_apikey"] ?? ""); ?>' class='regular-text chatgpt_ctrl large-apikey' autocomplete="off" />
     65                  <button type="button" class="button gpt-apikey-toggle"
     66                     data-target="chatgpt_apikey"
     67                     data-show="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_SHOW')); ?>"
     68                     data-hide="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_HIDE')); ?>"
     69                     title="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_SHOW')); ?>">
     70                     <span class="dashicons dashicons-visibility"></span>
     71                  </button>
     72               </div>
    5473               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_CHATGPT_APIKEY_DESC')); ?></p>
    5574            </td>
     
    788807               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_PAGE_EXCLUSIONS_DESC')); ?></p>
    789808            </td>
    790          </tr>
     809         </tr>
     810         <tr>
     811            <th scope='row'><label for='page_inclusions'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_PAGE_INCLUSIONS')); ?></label></th>
     812            <td>
     813               <textarea name="gptranslate_options[page_inclusions]"
     814                  id='page_inclusions' class='large-text' rows='5'><?php echo esc_textarea($options["page_inclusions"] ?? ""); ?></textarea>
     815               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_PAGE_INCLUSIONS_DESC')); ?></p>
     816            </td>
     817         </tr>
    791818         <tr>
    792819            <th scope='row'><label for='chatgpt_gtranslate_request_delay'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_REQUEST_DELAY')); ?></label></th>
     
    929956         </tr>
    930957         <tr>
     958            <th scope='row'><label for='lock_translations'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_LOCK_TRANSLATIONS')); ?></label></th>
     959            <td>
     960               <div class="wrapper">
     961                  <label><input type='radio' name="gptranslate_options[lock_translations]" value='1'<?php esc_html(checked($options["lock_translations"] ?? "1", "1")); ?>> <span><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_YES')); ?></span></label>
     962                  <label><input type='radio' name="gptranslate_options[lock_translations]" value='0'<?php esc_html(checked($options["lock_translations"] ?? "1", "0")); ?>> <span><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_NO')); ?></span></label>
     963               </div>
     964               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_LOCK_TRANSLATIONS_DESC')); ?></p>
     965            </td>
     966         </tr>
     967         <tr>
    931968            <th scope='row'><label for='css_selector_realtime_translations_retrigger'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_CSS_SELECTOR_REALTIME_TRANSLATIONS_RETRIGGER')); ?></label></th>
    932969            <td>
     
    12091246                  </div>
    12101247                  <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_WRAP_EXCLUDED_WORDS_DESC')); ?></p>
     1248               </td>
     1249            </tr>
     1250            <tr>
     1251               <th scope='row'><label for='apply_dictionary_to_aliases'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_APPLY_DICTIONARY_TO_ALIASES')); ?></label></th>
     1252               <td>
     1253                  <div class="wrapper">
     1254                     <label><input type='radio' name="gptranslate_options[apply_dictionary_to_aliases]" value='1'<?php esc_html(checked($options["apply_dictionary_to_aliases"] ?? "0", "1")); ?>> <span><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_YES')); ?></span></label>
     1255                     <label><input type='radio' name="gptranslate_options[apply_dictionary_to_aliases]" value='0'<?php esc_html(checked($options["apply_dictionary_to_aliases"] ?? "0", "0")); ?>> <span><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_NO')); ?></span></label>
     1256                  </div>
     1257                  <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_APPLY_DICTIONARY_TO_ALIASES_DESC')); ?></p>
    12111258               </td>
    12121259            </tr>
     
    13531400            <th scope='row'><label for='responsivevoice_apikey'><?php echo wp_kses_post($this->loadTranslations('PLG_GPTRANSLATE_RESPONSIVEVOICE_APIKEY')); ?></label></th>
    13541401            <td>
    1355                <input type='text' name="gptranslate_options[responsivevoice_apikey]"
    1356                   id='responsivevoice_apikey'
    1357                   value='<?php echo esc_attr($options["responsivevoice_apikey"] ?? "PEVOFBma"); ?>'
    1358                   class='regular-text' />
     1402               <div class="gpt-apikey-wrap">
     1403                  <input type='password' name="gptranslate_options[responsivevoice_apikey]"
     1404                     id='responsivevoice_apikey'
     1405                     value='<?php echo esc_attr($options["responsivevoice_apikey"] ?? "PEVOFBma"); ?>'
     1406                     class='regular-text' autocomplete="off" />
     1407                  <button type="button" class="button gpt-apikey-toggle"
     1408                     data-target="responsivevoice_apikey"
     1409                     data-show="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_SHOW')); ?>"
     1410                     data-hide="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_HIDE')); ?>"
     1411                     title="<?php echo esc_attr($this->loadTranslations('PLG_GPTRANSLATE_APIKEY_SHOW')); ?>">
     1412                     <span class="dashicons dashicons-visibility"></span>
     1413                  </button>
     1414               </div>
    13591415               <p class='description'><?php echo esc_html($this->loadTranslations('PLG_GPTRANSLATE_RESPONSIVEVOICE_APIKEY_DESC')); ?></p>
    13601416            </td>
Note: See TracChangeset for help on using the changeset viewer.