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:
parent
02ae17aa0f
commit
d9c6047a27
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user