mirror of
https://github.com/inretio/WordPress-Plugin-Boilerplate
synced 2024-12-22 20:03:53 +02:00
Fix loading textdomain when the plugin is symlinked
plugin_basename doesn't return the correct path if the plugin is symlinked into webdir/wp-content/plugins/. This fixes the problem.
This commit is contained in:
parent
86ecda68f6
commit
7e0d4a7cd8
1 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ class Plugin_Name {
|
||||||
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
||||||
|
|
||||||
load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
||||||
load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
load_plugin_textdomain( $domain, FALSE, basename( dirname( __FILE__ ) ) . '/lang/' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue