load_plugin_textdomain fails if plugin is loaded from mu-plugins
|Reported by:||ideag||Owned by:|
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.
Change History (20)
- Keywords close removed
- Milestone Awaiting Review deleted
- Resolution changed from fixed to worksforme
- Milestone set to Future Release
- Resolution worksforme deleted
- Status changed from closed to reopened
- Type changed from defect (bug) to enhancement
7 months ago
- Milestone changed from Future Release to 4.6
- Owner set to swissspidy
- Status changed from reopened to assigned