Plugin Directory

Changeset 3253110


Ignore:
Timestamp:
03/10/2025 06:41:18 AM (13 months ago)
Author:
creativform
Message:

2.2.2

  • Fixed problem with l10n.php algo
  • Removed PHP errors
Location:
serbian-transliteration
Files:
138 added
6 edited

Legend:

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

    r3252345 r3253110  
     1= 2.2.2 =
     2* Fixed problem with l10n.php algo
     3* Removed PHP errors
     4
    15= 2.2.1 =
    26* Fixed PHP errors from the previous version
  • serbian-transliteration/trunk/classes/controller.php

    r3252361 r3253110  
    679679        foreach ($xpath->query('//text()') as $textNode) {
    680680            if (!in_array($textNode->parentNode->nodeName, $skipTags)) {
    681                 $textNode->nodeValue = $this->transliterate_no_html($textNode->nodeValue);
     681                $textNode->nodeValue = $this->transliterate($textNode->nodeValue);
    682682            }
    683683        }
  • serbian-transliteration/trunk/classes/init.php

    r3200804 r3253110  
    77        $this->set_admin_cookie_based_on_url();
    88        $this->add_action('plugins_loaded', 'load_textdomain');
     9        $this->add_action('load_textdomain_mofile', 'load_textdomain_mofile', 10, 2);
    910        $this->add_action('template_redirect', 'set_transliteration');
    1011       
     
    118119     */
    119120    public function load_textdomain() {
    120         if (is_textdomain_loaded('serbian-transliteration')) {
     121        if (is_textdomain_loaded('serbian-transliteration')) {
    121122            return;
    122123        }
     
    133134        $mofile = sprintf('%s-%s.mo', 'serbian-transliteration', $locale);
    134135
    135         // First we check the translations inside the plugin directory
     136        // Only check the plugin's own languages directory
    136137        $domain_path = RSTR_ROOT . '/languages';
    137         $loaded = load_textdomain('serbian-transliteration', path_join($domain_path, $mofile));
    138    
    139         /*
    140          * DISABLED: - We don't need this part because the translation is intended only for this plugin,
    141          * but I will save it if needed in the future.
    142          *
    143        
    144         // If no translation is found, we check the global directory
    145         if (!$loaded) {
    146             $domain_path = path_join(WP_LANG_DIR, 'plugins');
    147             $loaded = load_textdomain('serbian-transliteration', path_join($domain_path, $mofile));
    148         }
    149 
    150         // If that doesn't work either, we check directly in WP_LANG_DIR
    151         if (!$loaded) {
    152             $loaded = load_textdomain('serbian-transliteration', path_join(WP_LANG_DIR, $mofile));
    153         }
    154        
    155         */
    156     }
     138        if (file_exists(path_join($domain_path, $mofile))) {
     139            load_textdomain('serbian-transliteration', path_join($domain_path, $mofile));
     140        }
     141    }
     142   
     143    /*
     144     * Do translations only inside plugin
     145     */
     146    public function load_textdomain_mofile ($mofile, $domain) {
     147        if ($domain === 'serbian-transliteration') {
     148            return RSTR_ROOT . '/languages/' . basename($mofile);
     149        }
     150        return $mofile;
     151    }
    157152
    158153
  • serbian-transliteration/trunk/classes/settings/page-credits.php

    r3159284 r3253110  
    1717    'Dušan Filiferović' => 'https://korisnickicentar.contrateam.com/aff.php?aff=385',
    1818    'Boris Kuljaj' => 'https://www.linkedin.com/in/boris-kuljaj-2944b4192/',
     19    'Branko Mrki Vidović' => 'https://www.facebook.com/branko.m.vidovic',
    1920    'Slobodan Pantović' => '',
    2021    'Ivan Stanojević' => '',
    2122    'Ognjen Odobašić' => '',
    22     'Miloš Maksimović' => '',
     23    'Miloš Maksimović' => ''
    2324); ?>
    2425<script>function rstr_popup(url, title, w, h) {
  • serbian-transliteration/trunk/readme.txt

    r3252345 r3253110  
    55Tested up to: 6.7
    66Requires PHP: 7.0
    7 Stable tag: 2.2.1
     7Stable tag: 2.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110
     111= 2.2.2 =
     112* Fixed problem with l10n.php algo
     113* Removed PHP errors
    110114
    111115= 2.2.1 =
     
    222226
    223227== Upgrade Notice ==
     228
     229= 2.2.2 =
     230* Fixed problem with l10n.php algo
     231* Removed PHP errors
    224232
    225233= 2.2.1 =
  • serbian-transliteration/trunk/serbian-transliteration.php

    r3252345 r3253110  
    66 * Description:       All in one Cyrillic to Latin transliteration plugin for WordPress that actually works.
    77 * Donate link:       https://www.buymeacoffee.com/ivijanstefan
    8  * Version:           2.2.1
     8 * Version:           2.2.2
    99 * Requires at least: 5.4
    1010 * Tested up to:      6.7
Note: See TracChangeset for help on using the changeset viewer.