TinyMCE: remove strings that are not translated before outputting the translations. Fixes #27797.
Built from https://develop.svn.wordpress.org/trunk@30294 git-svn-id: http://core.svn.wordpress.org/trunk@30293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ba10ab197b
commit
b3da068590
|
@ -976,6 +976,12 @@ final class _WP_Editors {
|
||||||
$mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale );
|
$mce_translation = apply_filters( 'wp_mce_translation', $mce_translation, $mce_locale );
|
||||||
|
|
||||||
foreach ( $mce_translation as $key => $value ) {
|
foreach ( $mce_translation as $key => $value ) {
|
||||||
|
// Remove strings that are not translated.
|
||||||
|
if ( $key === $value ) {
|
||||||
|
unset( $mce_translation[$key] );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( false !== strpos( $value, '&' ) ) {
|
if ( false !== strpos( $value, '&' ) ) {
|
||||||
$mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );
|
$mce_translation[$key] = html_entity_decode( $value, ENT_QUOTES, 'UTF-8' );
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.1-alpha-30293';
|
$wp_version = '4.1-alpha-30294';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue