Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 23046c95931db36613303d30e1d1861e45adfb5e 1 parent 193aca2
authored August 28, 2009

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  wp-includes/capabilities.php
5  wp-includes/capabilities.php
@@ -900,6 +900,11 @@ function map_meta_cap( $cap, $user_id ) {
900 900
 		else
901 901
 			$caps[] = 'read_private_pages';
902 902
 		break;
  903
+	case 'unfiltered_upload':
  904
+		if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true )
  905
+			$caps[] = $cap;
  906
+		else
  907
+			$caps[] = 'do_not_allow';
903 908
 	default:
904 909
 		// If no meta caps match, return the original cap.
905 910
 		$caps[] = $cap;

0 notes on commit 23046c9

Please sign in to comment.
Something went wrong with that request. Please try again.