WordPress.org

Make WordPress Core

Ticket #6938: load_plugin_textdomain-fix.patch

File load_plugin_textdomain-fix.patch, 516 bytes (added by sambauers, 6 years ago)
  • wp-includes/l10n.php

     
    291291        $locale = get_locale(); 
    292292 
    293293        if ( false === $path ) 
    294                 $path = WP_PLUGIN_DIR; 
     294                $path = ''; 
     295        else 
     296                $path = '/' . trim(trim($path), '/'); 
    295297 
    296         $mofile = $path . '/'. $domain . '-' . $locale . '.mo'; 
     298        $mofile = WP_PLUGIN_DIR . $path . '/'. $domain . '-' . $locale . '.mo'; 
    297299        load_textdomain($domain, $mofile); 
    298300} 
    299301