Plugin Directory

Changeset 3398696


Ignore:
Timestamp:
11/19/2025 09:25:37 AM (8 weeks ago)
Author:
ivijanstefan
Message:

2.3.10

  • Bugfix for the "_load_textdomain_just_in_time was called incorrectly"
Location:
serbian-transliteration
Files:
147 added
4 edited

Legend:

Unmodified
Added
Removed
  • serbian-transliteration/trunk/CHANGELOG.txt

    r3389693 r3398696  
     1= 2.3.10 =
     2* Bugfix for the "_load_textdomain_just_in_time was called incorrectly"
     3
    14= 2.3.9 =
    25* Quick fix for memory leak issues from the previous version.
  • serbian-transliteration/trunk/classes/init.php

    r3332175 r3398696  
    5353    public function hook_init(): void
    5454    {
    55         $this->add_action('init', 'load_textdomain');
    56         $this->add_filter('load_textdomain_mofile', 'load_textdomain_mofile', 10, 2);
     55
    5756    }
    5857
     
    135134
    136135    /*
    137      * Do translations
    138      */
    139     public function load_textdomain(): void
    140     {
    141         if (is_textdomain_loaded('serbian-transliteration')) {
    142             return;
    143         }
    144 
    145         if (!function_exists('is_user_logged_in')) {
    146             include_once ABSPATH . '/wp-includes/pluggable.php';
    147         }
    148 
    149         $locale = apply_filters(
    150             'rstr_plugin_locale',
    151             (is_user_logged_in() ? get_user_locale() : get_locale()),
    152             'serbian-transliteration'
    153         );
    154         $mofile = sprintf('%s-%s.mo', 'serbian-transliteration', $locale);
    155 
    156         // Only check the plugin's own languages directory
    157         $domain_path = RSTR_ROOT . '/languages';
    158         if (file_exists(path_join($domain_path, $mofile))) {
    159             load_textdomain('serbian-transliteration', path_join($domain_path, $mofile));
    160         }
    161     }
    162 
    163     /*
    164      * Do translations only inside plugin
    165      */
    166     public function load_textdomain_mofile($mofile, $domain)
    167     {
    168         if ($domain === 'serbian-transliteration') {
    169             return RSTR_ROOT . '/languages/' . basename($mofile);
    170         }
    171 
    172         return $mofile;
    173     }
    174 
    175     /*
    176136     * Register Plugin Activation
    177137     */
  • serbian-transliteration/trunk/readme.txt

    r3389693 r3398696  
    55Tested up to: 6.8
    66Requires PHP: 7.4
    7 Stable tag: 2.3.9
     7Stable tag: 2.3.10
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    8989
    9090== Changelog ==
     91
     92= 2.3.10 =
     93* Bugfix for the "_load_textdomain_just_in_time was called incorrectly"
    9194
    9295= 2.3.9 =
     
    268271
    269272== Upgrade Notice ==
     273
     274= 2.3.10 =
     275* Bugfix for the "_load_textdomain_just_in_time was called incorrectly"
    270276
    271277= 2.3.9 =
  • serbian-transliteration/trunk/serbian-transliteration.php

    r3389693 r3398696  
    55 * Plugin URI:        https://wordpress.org/plugins/serbian-transliteration/
    66 * Description:       All-in-one Cyrillic to Latin transliteration plugin for WordPress. Supports Slavic, Arabic, Greek, and Central Asian scripts.
    7  * Version:           2.3.9
     7 * Version:           2.3.10
    88 * Requires at least: 5.4
    99 * Tested up to:      6.8
Note: See TracChangeset for help on using the changeset viewer.