Skip to content

Commit 7e6d244

Browse files
author
Antti Kuosmanen
authored
Merge pull request #21 from timiwahalahti/master
Load textdomain also when plugin is must-use
2 parents 5eee793 + 0f82e8b commit 7e6d244

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

wp-libre-form.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ public static function flush_rewrites() {
7474
* Load our plugin textdomain
7575
*/
7676
public static function load_our_textdomain() {
77-
load_plugin_textdomain( 'wp-libre-form', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
77+
$loaded = load_plugin_textdomain( 'wp-libre-form', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
78+
79+
if( !$loaded ) {
80+
$loaded = load_muplugin_textdomain( 'wp-libre-form', dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
81+
}
7882
}
7983

8084
/**

0 commit comments

Comments
 (0)