Permalink
Browse files

Disallow unfiltered uploads for admins by default. fixes #10692 for 2.8

git-svn-id: http://svn.automattic.com/wordpress/branches/2.8@11888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 193aca2 commit 23046c95931db36613303d30e1d1861e45adfb5e ryan committed Aug 28, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 wp-includes/capabilities.php
@@ -900,6 +900,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;

0 comments on commit 23046c9

Please sign in to comment.