[wp-trac] [WordPress Trac] #23794: load_plugin_textdomain fails if plugin is loaded from mu-plugins

WordPress Trac noreply at wordpress.org
Wed May 8 11:04:13 UTC 2013


#23794: load_plugin_textdomain fails if plugin is loaded from mu-plugins
-------------------------+-----------------------------
 Reporter:  ideag        |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  Future Release
Component:  I18N         |     Version:  3.5.1
 Severity:  minor        |  Resolution:
 Keywords:               |
-------------------------+-----------------------------

Comment (by TroyDesign):

 I solved using code below:
 {{{
 add_filter( 'load_textdomain_mofile', 'tdc_mu_load_textdomain_mofile', 10,
 2 );
 function tdc_mu_load_textdomain_mofile($mofile, $domain) {
         $mumofile =
 WPMU_PLUGIN_DIR.preg_replace('%^'.WP_PLUGIN_DIR.'%','',$mofile);
         if (file_exists($mumofile)) return $mumofile;
         else return $mofile;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23794#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list