Throw a user notice when the editor ID used for TinyMCE contains brackets, props nacin, fixes #27601

git-svn-id: https://develop.svn.wordpress.org/trunk@27950 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-04-05 01:10:19 +00:00
parent 548772fcc1
commit 36f0a60829
1 changed files with 8 additions and 0 deletions

View File

@ -80,6 +80,14 @@ final class _WP_Editors {
) );
self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() );
if ( self::$this_tinymce ) {
if ( false !== strpos( $editor_id, '[' ) ) {
self::$this_tinymce = false;
_deprecated_argument( 'wp_editor()', '3.9', 'TinyMCE editor IDs cannot have brackets.' );
}
}
self::$this_quicktags = (bool) $set['quicktags'];
if ( self::$this_tinymce )