Do not show Media Upload buttons in Visual Editor if user lacks the capabilities to upload files. fixes #8110

git-svn-id: https://develop.svn.wordpress.org/trunk@9660 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2008-11-13 07:45:11 +00:00
parent 53fe2dd063
commit 634e2ab151
2 changed files with 3 additions and 2 deletions

View File

@@ -1483,6 +1483,9 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
if (($rows < 3) || ($rows > 100))
$rows = 12;
if ( !current_user_can( 'upload_files' ) )
$media_buttons = false;
$richedit = user_can_richedit();
$rows = "rows='$rows'";