From 36f0a60829b27a26737b071acf61bff9dfa39c0c Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 5 Apr 2014 01:10:19 +0000 Subject: [PATCH] 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 --- src/wp-includes/class-wp-editor.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wp-includes/class-wp-editor.php b/src/wp-includes/class-wp-editor.php index 1c014cf6e3..7583a738f1 100644 --- a/src/wp-includes/class-wp-editor.php +++ b/src/wp-includes/class-wp-editor.php @@ -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 )