From 40ac59ef2b588293533b7e03b1df27a10c7cfdc6 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 28 Aug 2009 00:17:53 +0000 Subject: [PATCH] Disallow unfiltered uploads for admins by default. fixes #10692 git-svn-id: http://svn.automattic.com/wordpress/trunk@11887 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index ec5b5020ed..104e08f3ea 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -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;