Disallow unfiltered uploads for admins by default. fixes #10692

git-svn-id: http://svn.automattic.com/wordpress/trunk@11887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-08-28 00:17:53 +00:00
parent 83f02363e1
commit 40ac59ef2b

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;