Disallow unfiltered uploads for admins by default. fixes #10692

git-svn-id: https://develop.svn.wordpress.org/trunk@11887 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-08-28 00:17:53 +00:00
parent 02ae17aa0f
commit d9c6047a27
1 changed files with 5 additions and 0 deletions

View File

@ -916,6 +916,11 @@ function map_meta_cap( $cap, $user_id ) {
else
$caps[] = 'read_private_pages';
break;
case 'unfiltered_upload':
if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true )
$caps[] = $cap;
else
$caps[] = 'do_not_allow';
default:
// If no meta caps match, return the original cap.
$caps[] = $cap;