WordPress.org

Make WordPress Core

Changeset 31874


Ignore:
Timestamp:
03/24/2015 08:32:23 PM (6 years ago)
Author:
azaozz
Message:

TinyMCE: fix error and PHP warning when adding more than one instance in RTL mode.
Part props maimairel. Fixes #31578.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r31733 r31874  
    29072907    if ( is_rtl() ) {
    29082908        $input['directionality'] = 'rtl';
    2909         $input['plugins'] .= ',directionality';
    2910         $input['toolbar1'] .= ',ltr';
     2909
     2910        if ( ! empty( $input['plugins'] ) && strpos( $input['plugins'], 'directionality' ) === false ) {
     2911            $input['plugins'] .= ',directionality';
     2912        }
     2913
     2914        if ( ! empty( $input['toolbar1'] ) && ! preg_match( '/\bltr\b/', $input['toolbar1'] ) ) {
     2915            $input['toolbar1'] .= ',ltr';
     2916        }
    29112917    }
    29122918
Note: See TracChangeset for help on using the changeset viewer.