mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Plugins: In _get_plugin_data_markup_translate()
don't reload translations if they're already loaded.
Props jrf. Fixes #35439. Built from https://develop.svn.wordpress.org/trunk@36282 git-svn-id: http://core.svn.wordpress.org/trunk@36249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d136ce421
commit
a51129c2a6
@ -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'] )
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) . $plugin_data['DomainPath'] );
|
||||
else
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) );
|
||||
if ( ! is_textdomain_loaded( $textdomain ) ) {
|
||||
if ( $plugin_data['DomainPath'] ) {
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) . $plugin_data['DomainPath'] );
|
||||
} else {
|
||||
load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) );
|
||||
}
|
||||
}
|
||||
} elseif ( in_array( basename( $plugin_file ), array( 'hello.php', 'akismet.php' ) ) ) {
|
||||
$textdomain = 'default';
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36279';
|
||||
$wp_version = '4.5-alpha-36282';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user