Plugin Directory

Changeset 3415968


Ignore:
Timestamp:
12/10/2025 04:18:50 AM (4 months ago)
Author:
linguise
Message:

Updating to version 2.2.9

Location:
linguise
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • linguise/tags/2.2.9/linguise.php

    r3414869 r3415968  
    55 * Plugin URI: https://www.linguise.com/
    66 * Description: Linguise translation plugin
    7  * Version:2.2.8
     7 * Version:2.2.9
    88 * Text Domain: linguise
    99 * Domain Path: /languages
  • linguise/tags/2.2.9/readme.txt

    r3414869 r3415968  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 2.2.8
     6Stable tag: 2.2.9
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    108108== Changelog ==
    109109
     110= 2.2.9 =
     111- Fix: Locale/language code checking can be wrong in some cases
     112
    110113= 2.2.8 =
    111114- Fix: WooCommerce Stripe Gateway not loaded in classic checkout
  • linguise/tags/2.2.9/src/Helper.php

    r3413813 r3415968  
    220220    }
    221221
     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    }
    222236
    223237    /**
     
    243257
    244258        // 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) {
    249263            return true;
    250264        }
    251265
    252266        // trim $locale until _ or -
    253         $locale = substr($locale, 0, strpos($locale, '_'));
    254         $locale = substr($locale, 0, strpos($locale, '-'));
     267        $locale = substr($locale, 0, self::ensureStrpos($locale, '_'));
     268        $locale = substr($locale, 0, self::ensureStrpos($locale, '-'));
    255269
    256270        return strcasecmp($locale, $test_locale) === 0;
  • linguise/tags/2.2.9/src/constants.php

    r3414869 r3415968  
    11<?php
    22if (!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');
    44}
    55
    66if (!defined('LINGUISE_VERSION')) {
    7     define('LINGUISE_VERSION', '2.2.8');
     7    define('LINGUISE_VERSION', '2.2.9');
    88}
  • linguise/tags/2.2.9/vendor/composer/installed.php

    r3414869 r3415968  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'f8f2694687b16eae024c3b452a76905f49879d9f',
     6        'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
    34             'reference' => 'f8f2694687b16eae024c3b452a76905f49879d9f',
     34            'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../../',
  • linguise/trunk/linguise.php

    r3414869 r3415968  
    55 * Plugin URI: https://www.linguise.com/
    66 * Description: Linguise translation plugin
    7  * Version:2.2.8
     7 * Version:2.2.9
    88 * Text Domain: linguise
    99 * Domain Path: /languages
  • linguise/trunk/readme.txt

    r3414869 r3415968  
    44Requires at least: 4.0
    55Tested up to: 6.9
    6 Stable tag: 2.2.8
     6Stable tag: 2.2.9
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    108108== Changelog ==
    109109
     110= 2.2.9 =
     111- Fix: Locale/language code checking can be wrong in some cases
     112
    110113= 2.2.8 =
    111114- Fix: WooCommerce Stripe Gateway not loaded in classic checkout
  • linguise/trunk/src/Helper.php

    r3413813 r3415968  
    220220    }
    221221
     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    }
    222236
    223237    /**
     
    243257
    244258        // 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) {
    249263            return true;
    250264        }
    251265
    252266        // trim $locale until _ or -
    253         $locale = substr($locale, 0, strpos($locale, '_'));
    254         $locale = substr($locale, 0, strpos($locale, '-'));
     267        $locale = substr($locale, 0, self::ensureStrpos($locale, '_'));
     268        $locale = substr($locale, 0, self::ensureStrpos($locale, '-'));
    255269
    256270        return strcasecmp($locale, $test_locale) === 0;
  • linguise/trunk/src/constants.php

    r3414869 r3415968  
    11<?php
    22if (!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');
    44}
    55
    66if (!defined('LINGUISE_VERSION')) {
    7     define('LINGUISE_VERSION', '2.2.8');
     7    define('LINGUISE_VERSION', '2.2.9');
    88}
  • linguise/trunk/vendor/composer/installed.php

    r3414869 r3415968  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'f8f2694687b16eae024c3b452a76905f49879d9f',
     6        'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    3232            'pretty_version' => 'dev-master',
    3333            'version' => 'dev-master',
    34             'reference' => 'f8f2694687b16eae024c3b452a76905f49879d9f',
     34            'reference' => '3a5d90b0a02e8b9f93e23bd919ed10104e385b23',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.