Plugins: In _get_plugin_data_markup_translate()
don't reload translations if they're already loaded.
Props jrf. Fixes #35439. git-svn-id: https://develop.svn.wordpress.org/trunk@36282 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5a545bbe90
commit
c86ffe454a
@ -117,10 +117,13 @@ function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup
|
||||
// Translate fields
|
||||
if ( $translate ) {
|
||||
if ( $textdomain = $plugin_data['TextDomain'] ) {
|
||||
if ( $plugin_data['DomainPath'] )
|
||||
if ( ! is_textdomain_loaded( $textdomain ) ) {
|
||||
if ( $plugin_data['DomainPath'] ) {
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) . $plugin_data['DomainPath'] );
|
||||
else
|
||||
} else {
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) );
|
||||
}
|
||||
}
|
||||
} elseif ( in_array( basename( $plugin_file ), array( 'hello.php', 'akismet.php' ) ) ) {
|
||||
$textdomain = 'default';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user