Changeset 3146083
- Timestamp:
- 09/03/2024 04:44:26 PM (18 months ago)
- Location:
- dashamail
- Files:
-
- 21 added
- 3 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/README.txt (added)
-
tags/1.0.6/assets (added)
-
tags/1.0.6/assets/css (added)
-
tags/1.0.6/assets/css/style.css (added)
-
tags/1.0.6/assets/img (added)
-
tags/1.0.6/assets/img/logo.png (added)
-
tags/1.0.6/assets/img/logo_big.png (added)
-
tags/1.0.6/assets/img/logo_dasha.png (added)
-
tags/1.0.6/assets/js (added)
-
tags/1.0.6/assets/js/script.js (added)
-
tags/1.0.6/assets/screenshot-1.png (added)
-
tags/1.0.6/assets/screenshot-2.png (added)
-
tags/1.0.6/assets/screenshot-3.png (added)
-
tags/1.0.6/dashamail.php (added)
-
tags/1.0.6/dshm_app (added)
-
tags/1.0.6/dshm_app/Infrastructure (added)
-
tags/1.0.6/dshm_app/Infrastructure/dshm_DashaMailAPI.php (added)
-
tags/1.0.6/dshm_app/Infrastructure/dshm_PluginActivator.php (added)
-
tags/1.0.6/dshm_app/Infrastructure/dshm_SettingsPage.php (added)
-
tags/1.0.6/dshm_app/Infrastructure/dshm_WordPressFacade.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/dashamail.php (modified) (1 diff)
-
trunk/dshm_app/Infrastructure/dshm_SettingsPage.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dashamail/trunk/README.txt
r3102708 r3146083 5 5 Tags: email, subsciption, dashamail, mail, dasha 6 6 Requires at least: 6.2.2 7 Tested up to: 6. 4.37 Tested up to: 6.6.1 8 8 Requires PHP: 7.4 9 Stable tag: 1.0. 59 Stable tag: 1.0.6 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 46 46 47 47 == Changelog == 48 = 1.0.6 - 2024-09-03 = 49 Оптимизированы запросы к API Dashamail 50 48 51 = 1.0.5 - 2024-06-14 = 49 52 Исправлена проблема подключения дополнительных скриптов -
dashamail/trunk/dashamail.php
r3102708 r3146083 3 3 * Plugin Name: DashaMail 4 4 * Description: Плагин интеграции с DashaMail 5 * Version: 1.0. 55 * Version: 1.0.6 6 6 * Requires at least: 6.2.2 7 7 * Requires PHP: 7.4 -
dashamail/trunk/dshm_app/Infrastructure/dshm_SettingsPage.php
r3037701 r3146083 60 60 public function __construct() { 61 61 $apiKey = \get_option('dashamail_api_key'); 62 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($apiKey); 62 63 $url = ((!empty($_SERVER['HTTPS'])) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 64 if (str_contains($url, 'wp-admin') && str_contains($url, 'dashamail_settings')) { 65 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($apiKey); 66 } 63 67 } 64 68 … … 157 161 function dshm_TemplateApiKey( $args ){ 158 162 $value = \get_option( $args[ 'name' ] ); 159 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($value); 163 if (!$this->isApiKeyCorrect) { 164 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($value); 165 } 160 166 $isApiKeyCorrect = $this->isApiKeyCorrect?'valid':'invalid'; 161 167 … … 188 194 189 195 $apiKey = \get_option('dashamail_api_key'); 190 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($apiKey); 196 if (!$this->isApiKeyCorrect) { 197 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($apiKey); 198 } 191 199 192 200 $lists[] = ['name' => '-', 'id' => '0']; … … 276 284 277 285 public function dshm_DashamailValidateAPI($input){ 278 if (!dshm_DashaMailAPI::dshm_isApiKeyCorrect($input)) { 286 if (!$this->isApiKeyCorrect) { 287 $this->isApiKeyCorrect = dshm_DashaMailAPI::dshm_isApiKeyCorrect($input); 288 } 289 if (!$this->isApiKeyCorrect) { 279 290 \add_settings_error( 280 291 self::$DSHM_ERROR_SLUG,
Note: See TracChangeset
for help on using the changeset viewer.