Plugin Directory

Changeset 3149029


Ignore:
Timestamp:
09/10/2024 07:29:50 AM (17 months ago)
Author:
motaword
Message:

v2.0.3 better locale code path prefix regex

Location:
motaword
Files:
36 added
4 edited

Legend:

Unmodified
Added
Removed
  • motaword/trunk/README.txt

    r3096010 r3149029  
    8989== Changelog ==
    9090
     91= 2.0.3 =
     92* Better locale code path prefix regex
     93
    9194= 2.0.2 =
    9295* PHP 8.3 Compatibility
  • motaword/trunk/includes/class-motaword-active-serve.php

    r3096010 r3149029  
    457457        $blacklistUrls = explode("\n", (string)$this->plugin->getOption(MotaWord_Admin::$options['active_blacklist_urls']));
    458458        $blacklistUrls = array_filter(array_map(function ($url) { return isset($url) ? trim($url) : null; }, $blacklistUrls));
    459         $pattern = '.*';
    460         $patternWithLocale = '#^(^([/]?)(' . implode('|', $locales) . '))(' . $pattern . '|' . mb_strtoupper($pattern) . '|' . mb_strtolower($pattern) . ')\z#u';
     459        $patternWithLocale = '#^(^([/]?)(' . implode('|', $locales) . '))(?:\/.*|\z)#u';
    461460        preg_match($patternWithLocale, rtrim(trim($path), '/'), $matches);
    462461        $isLocalePath = isset($matches[1]) && $matches[1] ? $matches[1] : ($matches[0] ?? null);
  • motaword/trunk/includes/class-motaword.php

    r3096010 r3149029  
    2323 * version of the plugin.
    2424 *
    25  * @version    2.0.2
     25 * @version    2.0.3
    2626 * @package    motaword
    2727 * @subpackage motaword/includes
     
    107107     * @param string $pluginName
    108108     *
    109      * @version    2.0.2
     109     * @version    2.0.3
    110110     */
    111111    public function __construct($pluginName = 'motaword/motaword.php')
     
    113113
    114114        $this->motaword = 'motaword';
    115         $this->version = '2.0.2';
     115        $this->version = '2.0.3';
    116116
    117117        $this->setPluginFile($pluginName);
  • motaword/trunk/motaword.php

    r3096010 r3149029  
    1616 * Plugin URI:        https://www.motaword.com/developer
    1717 * Description:       MotaWord plugin allows you to seamlessly submit your posts for translation to MotaWord.
    18  * Version:           2.0.2
     18 * Version:           2.0.3
    1919 * Author:            MotaWord Engineering <[email protected]>
    2020 * Author URI:        https://www.motaword.com/developer
Note: See TracChangeset for help on using the changeset viewer.