From db65c15abad2ca1bea72bd3aefebefbe5b7ccbc5 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 18 Jul 2017 01:45:34 +0000 Subject: [PATCH] TinyMCE: fix directionality settings for RTL languages. Merges [40927] to 4.8 branch. Props westonruter, sa3idho. Fixes #40972 for 4.8.1. Built from https://develop.svn.wordpress.org/branches/4.8@41066 git-svn-id: http://core.svn.wordpress.org/branches/4.8@40918 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 8879797914..71163e194a 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -826,6 +826,10 @@ final class _WP_Editors { $settings['indent'] = true; $settings['elementpath'] = false; + if ( is_rtl() ) { + $settings['directionality'] = 'rtl'; + } + // In production all plugins are loaded (they are in wp-editor.js.gz) // but only these will be initialized by default. $settings['plugins'] = implode( ',', array(