From 2b6ceeb4654ada939edef6428ca6cde8ba3dc3c0 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 30 Oct 2016 12:47:31 +0000 Subject: [PATCH] Customize: Correct the capability mapping and associated tests for the `unfiltered_css` capability. Fixes #35395 Built from https://develop.svn.wordpress.org/trunk@39016 git-svn-id: http://core.svn.wordpress.org/trunk@38958 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 6 ++---- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index c9158b6071..fe87bc8d70 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -320,6 +320,7 @@ function map_meta_cap( $cap, $user_id ) { else $caps[] = 'do_not_allow'; break; + case 'unfiltered_css' : case 'unfiltered_html' : // Disallow unfiltered_html for all users, even admins and super admins. if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML ) @@ -327,10 +328,7 @@ function map_meta_cap( $cap, $user_id ) { elseif ( is_multisite() && ! is_super_admin( $user_id ) ) $caps[] = 'do_not_allow'; else - $caps[] = $cap; - break; - case 'unfiltered_css' : - $caps[] = 'unfiltered_html'; + $caps[] = 'unfiltered_html'; break; case 'edit_files': case 'edit_plugins': diff --git a/wp-includes/version.php b/wp-includes/version.php index df4f583999..d117495ebf 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-beta1-39015'; +$wp_version = '4.7-beta1-39016'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.