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

Built from https://develop.svn.wordpress.org/trunk@27950


git-svn-id: http://core.svn.wordpress.org/trunk@27780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-04-05 01:11:16 +00:00
parent e392b42c70
commit 24d026f682
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 )