Changeset 3442930
- Timestamp:
- 01/20/2026 04:33:35 AM (2 months ago)
- Location:
- linguise
- Files:
-
- 10 edited
- 1 copied
-
tags/2.2.20 (copied) (copied from linguise/trunk)
-
tags/2.2.20/linguise.php (modified) (1 diff)
-
tags/2.2.20/readme.txt (modified) (2 diffs)
-
tags/2.2.20/src/constants.php (modified) (1 diff)
-
tags/2.2.20/src/thirdparty/wp-forms.php (modified) (5 diffs)
-
tags/2.2.20/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/linguise.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/constants.php (modified) (1 diff)
-
trunk/src/thirdparty/wp-forms.php (modified) (5 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linguise/tags/2.2.20/linguise.php
r3439211 r3442930 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2. 197 * Version:2.2.20 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/tags/2.2.20/readme.txt
r3439211 r3442930 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2. 196 Stable tag: 2.2.20 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 109 109 == Changelog == 110 = 2.2.20 = 111 - Feature: Support translating WPForms redirect URL 112 110 113 = 2.2.19 = 111 114 - Fix: Unable to switch using language switcher -
linguise/tags/2.2.20/src/constants.php
r3439211 r3442930 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2. 19');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.20'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2. 19');7 define('LINGUISE_VERSION', '2.2.20'); 8 8 } -
linguise/tags/2.2.20/src/thirdparty/wp-forms.php
r3434029 r3442930 52 52 53 53 /** 54 * Decides if the WPForms integration should be loaded. 55 * 56 * @return boolean 57 */ 58 public function shouldLoad() 59 { 60 return is_plugin_active('wpforms-lite/wpforms.php') || is_plugin_active('wpforms/wpforms.php'); 61 } 62 63 /** 54 64 * Load the integration 55 65 * … … 58 68 public function init() 59 69 { 70 add_filter('wpforms_process_redirect_url', [$this, 'translateRedirectUrl'], 1000, 1); 71 60 72 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action 61 73 if (!empty($_REQUEST['action']) && $_REQUEST['action'] === 'wpforms_submit') { … … 66 78 67 79 /** 68 * Decides if the WPForms integration should be loaded.69 *70 * @return boolean71 */72 public function shouldLoad()73 {74 return is_plugin_active('wpforms-lite/wpforms.php') || is_plugin_active('wpforms/wpforms.php');75 }76 77 /**78 80 * Unload the integration 79 81 * … … 82 84 public function destroy() 83 85 { 86 remove_filter('wpforms_process_redirect_url', [$this, 'translateRedirectUrl'], 1000); 87 84 88 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action 85 89 if (!empty($_REQUEST['action']) && $_REQUEST['action'] === 'wpforms_submit') { 86 remove_filter('wp_mail', [$this, 'translateEmails'], 1000 , 1);87 remove_filter('wpforms_frontend_confirmation_message', [$this, 'translateConfirmationMessage'], 10 , 1);90 remove_filter('wp_mail', [$this, 'translateEmails'], 1000); 91 remove_filter('wpforms_frontend_confirmation_message', [$this, 'translateConfirmationMessage'], 10); 88 92 } 89 93 } … … 221 225 return $matches[1]; 222 226 } 227 228 /** 229 * Logs the redirect URL for debugging purposes. 230 * 231 * @param string $url The redirect URL to be translated. 232 * 233 * @return string 234 */ 235 public function translateRedirectUrl($url) 236 { 237 // Store to error log for debugging 238 $language = WPHelper::getLanguageFromReferer(); 239 if (!$language) { 240 return $url; 241 } 242 243 // Translate the URL 244 $result = $this->translateUrl($language, $url); 245 if (empty($result)) { 246 return $url; 247 } 248 249 return $result; 250 } 223 251 } -
linguise/tags/2.2.20/vendor/composer/installed.php
r3439211 r3442930 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' a12089f06672c562e4f5de76b559d2f2c09c674b',6 'reference' => '354f19240a11160636da0632f88c9c6f875a58b2', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' a12089f06672c562e4f5de76b559d2f2c09c674b',34 'reference' => '354f19240a11160636da0632f88c9c6f875a58b2', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../', -
linguise/trunk/linguise.php
r3439211 r3442930 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2. 197 * Version:2.2.20 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/trunk/readme.txt
r3439211 r3442930 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2. 196 Stable tag: 2.2.20 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 109 109 == Changelog == 110 = 2.2.20 = 111 - Feature: Support translating WPForms redirect URL 112 110 113 = 2.2.19 = 111 114 - Fix: Unable to switch using language switcher -
linguise/trunk/src/constants.php
r3439211 r3442930 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2. 19');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.20'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2. 19');7 define('LINGUISE_VERSION', '2.2.20'); 8 8 } -
linguise/trunk/src/thirdparty/wp-forms.php
r3434029 r3442930 52 52 53 53 /** 54 * Decides if the WPForms integration should be loaded. 55 * 56 * @return boolean 57 */ 58 public function shouldLoad() 59 { 60 return is_plugin_active('wpforms-lite/wpforms.php') || is_plugin_active('wpforms/wpforms.php'); 61 } 62 63 /** 54 64 * Load the integration 55 65 * … … 58 68 public function init() 59 69 { 70 add_filter('wpforms_process_redirect_url', [$this, 'translateRedirectUrl'], 1000, 1); 71 60 72 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action 61 73 if (!empty($_REQUEST['action']) && $_REQUEST['action'] === 'wpforms_submit') { … … 66 78 67 79 /** 68 * Decides if the WPForms integration should be loaded.69 *70 * @return boolean71 */72 public function shouldLoad()73 {74 return is_plugin_active('wpforms-lite/wpforms.php') || is_plugin_active('wpforms/wpforms.php');75 }76 77 /**78 80 * Unload the integration 79 81 * … … 82 84 public function destroy() 83 85 { 86 remove_filter('wpforms_process_redirect_url', [$this, 'translateRedirectUrl'], 1000); 87 84 88 // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- No action 85 89 if (!empty($_REQUEST['action']) && $_REQUEST['action'] === 'wpforms_submit') { 86 remove_filter('wp_mail', [$this, 'translateEmails'], 1000 , 1);87 remove_filter('wpforms_frontend_confirmation_message', [$this, 'translateConfirmationMessage'], 10 , 1);90 remove_filter('wp_mail', [$this, 'translateEmails'], 1000); 91 remove_filter('wpforms_frontend_confirmation_message', [$this, 'translateConfirmationMessage'], 10); 88 92 } 89 93 } … … 221 225 return $matches[1]; 222 226 } 227 228 /** 229 * Logs the redirect URL for debugging purposes. 230 * 231 * @param string $url The redirect URL to be translated. 232 * 233 * @return string 234 */ 235 public function translateRedirectUrl($url) 236 { 237 // Store to error log for debugging 238 $language = WPHelper::getLanguageFromReferer(); 239 if (!$language) { 240 return $url; 241 } 242 243 // Translate the URL 244 $result = $this->translateUrl($language, $url); 245 if (empty($result)) { 246 return $url; 247 } 248 249 return $result; 250 } 223 251 } -
linguise/trunk/vendor/composer/installed.php
r3439211 r3442930 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' a12089f06672c562e4f5de76b559d2f2c09c674b',6 'reference' => '354f19240a11160636da0632f88c9c6f875a58b2', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' a12089f06672c562e4f5de76b559d2f2c09c674b',34 'reference' => '354f19240a11160636da0632f88c9c6f875a58b2', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.