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

WordPress Trac noreply at wordpress.org
Sat Mar 16 10:43:37 UTC 2013


#23794: load_plugin_textdomain fails if plugin is loaded from mu-plugins
--------------------------+-------------------------
 Reporter:  ideag         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  I18N          |     Version:  3.5.1
 Severity:  minor         |  Resolution:  worksforme
 Keywords:                |
--------------------------+-------------------------

Comment (by SergeyBiryukov):

 Here's a workaround I wrote for one of my plugins in case someone decided
 to put it in `mu-plugins`: [[BR]]
 {{{
 if ( false !== strpos( __FILE__, basename( WPMU_PLUGIN_DIR ) ) )
         load_muplugin_textdomain( '...' );
 else
         load_plugin_textdomain( '...', false, dirname( plugin_basename(
 __FILE__ ) ) );
 }}}

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


More information about the wp-trac mailing list