[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 09:48:38 UTC 2013
#23794: load_plugin_textdomain fails if plugin is loaded from mu-plugins
-----------------------------+--------------------------
Reporter: ideag | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: I18N
Version: 3.5.1 | Severity: minor
Keywords: |
-----------------------------+--------------------------
load_plugin_textdomain is realative to WP_PLUGIN_DIR, so it fails to load
localization files if plugin keeps them in its directory.
The function should check if is called from mu-plugins and use
WP_MUPLUGIN_DIR in that case.
I can fix this in my own plugin by adding '../mu-lugins/' like this:
{{{
load_plugin_textdomain( 'tiny_tribuna', false, '../mu-plugins/'.dirname(
plugin_basename( __FILE__ ) ) . '/languages/');
}}}
but this is not a good option for other plugins.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23794>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list