From 981960fa0938f4e1d1d99ad1859ee6ea3f40c4a7 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 26 Apr 2010 21:42:42 +0000 Subject: [PATCH] Introduce DISALLOW_UNFILTERED_HTML git-svn-id: https://develop.svn.wordpress.org/trunk@14244 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/capabilities.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index a88156445d..2bfa0b95d7 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -1018,6 +1018,12 @@ function map_meta_cap( $cap, $user_id ) { } // Fall through if not DISALLOW_FILE_MODS. case 'unfiltered_html': + // Disallow unfiltered_html for all users, even admins and super admins. + if ( defined('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML ) { + $caps[] = 'do_not_allow'; + break; + } + // Fall through if not DISALLOW_UNFILTERED_HTML case 'delete_user': case 'delete_users': // If multisite these caps are allowed only for super admins.