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:
parent
83f02363e1
commit
40ac59ef2b
|
@ -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