TinyMCE: fix error and PHP warning when adding more than one instance in RTL mode.

Part props maimairel. Fixes #31578.
Built from https://develop.svn.wordpress.org/trunk@31874


git-svn-id: http://core.svn.wordpress.org/trunk@31853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-03-24 20:33:27 +00:00
parent ce6c00f140
commit 64f1a8a992
2 changed files with 9 additions and 3 deletions

View File

@ -2906,9 +2906,15 @@ function _config_wp_siteurl( $url = '' ) {
function _mce_set_direction( $input ) {
if ( is_rtl() ) {
$input['directionality'] = 'rtl';
if ( ! empty( $input['plugins'] ) && strpos( $input['plugins'], 'directionality' ) === false ) {
$input['plugins'] .= ',directionality';
}
if ( ! empty( $input['toolbar1'] ) && ! preg_match( '/\bltr\b/', $input['toolbar1'] ) ) {
$input['toolbar1'] .= ',ltr';
}
}
return $input;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta2-31873';
$wp_version = '4.2-beta2-31874';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.