From a51129c2a6565750e5cb14512d1aff768f174e92 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 13 Jan 2016 13:04:27 +0000 Subject: [PATCH] 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 --- wp-admin/includes/plugin.php | 11 +++++++---- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 415ef5b5ea..bd840539e3 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -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'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 991d028bc0..d552c33c8d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.