Changeset 3415968
- Timestamp:
- 12/10/2025 04:18:50 AM (4 months ago)
- Location:
- linguise
- Files:
-
- 10 edited
- 1 copied
-
tags/2.2.9 (copied) (copied from linguise/trunk)
-
tags/2.2.9/linguise.php (modified) (1 diff)
-
tags/2.2.9/readme.txt (modified) (2 diffs)
-
tags/2.2.9/src/Helper.php (modified) (2 diffs)
-
tags/2.2.9/src/constants.php (modified) (1 diff)
-
tags/2.2.9/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/linguise.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Helper.php (modified) (2 diffs)
-
trunk/src/constants.php (modified) (1 diff)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linguise/tags/2.2.9/linguise.php
r3414869 r3415968 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2. 87 * Version:2.2.9 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/tags/2.2.9/readme.txt
r3414869 r3415968 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2. 86 Stable tag: 2.2.9 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 == Changelog == 109 109 110 = 2.2.9 = 111 - Fix: Locale/language code checking can be wrong in some cases 112 110 113 = 2.2.8 = 111 114 - Fix: WooCommerce Stripe Gateway not loaded in classic checkout -
linguise/tags/2.2.9/src/Helper.php
r3413813 r3415968 220 220 } 221 221 222 /** 223 * Safe strpos function 224 * 225 * @param string $haystack The haystack string 226 * @param string $needle The needle string 227 * 228 * @return integer The position of the needle in the haystack or the length of the haystack if 229 * the needle is not found 230 */ 231 public static function ensureStrpos($haystack, $needle) 232 { 233 $pos = strpos($haystack, $needle); 234 return $pos === false ? strlen($haystack) : $pos; 235 } 222 236 223 237 /** … … 243 257 244 258 // trim until _ or - 245 $test_ substr = substr($test_locale, 0, strpos($test_locale, '_'));246 $test_ substr = substr($test_substr, 0, strpos($test_substr, '-'));247 248 if (strcasecmp($locale, $test_ substr) === 0) {259 $test_locale = substr($test_locale, 0, self::ensureStrpos($test_locale, '_')); 260 $test_locale = substr($test_locale, 0, self::ensureStrpos($test_locale, '-')); 261 262 if (strcasecmp($locale, $test_locale) === 0) { 249 263 return true; 250 264 } 251 265 252 266 // trim $locale until _ or - 253 $locale = substr($locale, 0, s trpos($locale, '_'));254 $locale = substr($locale, 0, s trpos($locale, '-'));267 $locale = substr($locale, 0, self::ensureStrpos($locale, '_')); 268 $locale = substr($locale, 0, self::ensureStrpos($locale, '-')); 255 269 256 270 return strcasecmp($locale, $test_locale) === 0; -
linguise/tags/2.2.9/src/constants.php
r3414869 r3415968 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2. 8');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.9'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2. 8');7 define('LINGUISE_VERSION', '2.2.9'); 8 8 } -
linguise/tags/2.2.9/vendor/composer/installed.php
r3414869 r3415968 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' f8f2694687b16eae024c3b452a76905f49879d9f',6 'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' f8f2694687b16eae024c3b452a76905f49879d9f',34 'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../', -
linguise/trunk/linguise.php
r3414869 r3415968 5 5 * Plugin URI: https://www.linguise.com/ 6 6 * Description: Linguise translation plugin 7 * Version:2.2. 87 * Version:2.2.9 8 8 * Text Domain: linguise 9 9 * Domain Path: /languages -
linguise/trunk/readme.txt
r3414869 r3415968 4 4 Requires at least: 4.0 5 5 Tested up to: 6.9 6 Stable tag: 2.2. 86 Stable tag: 2.2.9 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 108 108 == Changelog == 109 109 110 = 2.2.9 = 111 - Fix: Locale/language code checking can be wrong in some cases 112 110 113 = 2.2.8 = 111 114 - Fix: WooCommerce Stripe Gateway not loaded in classic checkout -
linguise/trunk/src/Helper.php
r3413813 r3415968 220 220 } 221 221 222 /** 223 * Safe strpos function 224 * 225 * @param string $haystack The haystack string 226 * @param string $needle The needle string 227 * 228 * @return integer The position of the needle in the haystack or the length of the haystack if 229 * the needle is not found 230 */ 231 public static function ensureStrpos($haystack, $needle) 232 { 233 $pos = strpos($haystack, $needle); 234 return $pos === false ? strlen($haystack) : $pos; 235 } 222 236 223 237 /** … … 243 257 244 258 // trim until _ or - 245 $test_ substr = substr($test_locale, 0, strpos($test_locale, '_'));246 $test_ substr = substr($test_substr, 0, strpos($test_substr, '-'));247 248 if (strcasecmp($locale, $test_ substr) === 0) {259 $test_locale = substr($test_locale, 0, self::ensureStrpos($test_locale, '_')); 260 $test_locale = substr($test_locale, 0, self::ensureStrpos($test_locale, '-')); 261 262 if (strcasecmp($locale, $test_locale) === 0) { 249 263 return true; 250 264 } 251 265 252 266 // trim $locale until _ or - 253 $locale = substr($locale, 0, s trpos($locale, '_'));254 $locale = substr($locale, 0, s trpos($locale, '-'));267 $locale = substr($locale, 0, self::ensureStrpos($locale, '_')); 268 $locale = substr($locale, 0, self::ensureStrpos($locale, '-')); 255 269 256 270 return strcasecmp($locale, $test_locale) === 0; -
linguise/trunk/src/constants.php
r3414869 r3415968 1 1 <?php 2 2 if (!defined('LINGUISE_SCRIPT_TRANSLATION_VERSION')) { 3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2. 8');3 define('LINGUISE_SCRIPT_TRANSLATION_VERSION', 'wordpress_plugin/2.2.9'); 4 4 } 5 5 6 6 if (!defined('LINGUISE_VERSION')) { 7 define('LINGUISE_VERSION', '2.2. 8');7 define('LINGUISE_VERSION', '2.2.9'); 8 8 } -
linguise/trunk/vendor/composer/installed.php
r3414869 r3415968 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' f8f2694687b16eae024c3b452a76905f49879d9f',6 'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' f8f2694687b16eae024c3b452a76905f49879d9f',34 'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.