Make WordPress Core

Changeset 26982


Ignore:
Timestamp:
01/18/2014 10:19:07 PM (11 years ago)
Author:
azaozz
Message:

TinyMCE: fix 3.x callbacks added with init.setup as they run before the compat3x plugin is loaded. Ideally this will be fixed internally in TinyMCE, see #24067.

File:
1 edited

Legend:

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

    r26958 r26982  
    446446                $mceInit['toolbar3'] = $mceInit['toolbar4'];
    447447                $mceInit['toolbar4'] = '';
     448            }
     449
     450            // Fix 3.x callbacks added with init.setup
     451            if ( ! empty( $mceInit['setup'] ) ) {
     452                $func = $mceInit['setup'];
     453                $mceInit['setup'] = "function( editor ) { editor.on( 'PreInit', function(){ ($func).call( this, editor ); }); }";
    448454            }
    449455
Note: See TracChangeset for help on using the changeset viewer.