WordPress.org

Make WordPress Core

Changeset 39016


Ignore:
Timestamp:
10/30/2016 12:46:46 PM (3 years ago)
Author:
johnbillion
Message:

Customize: Correct the capability mapping and associated tests for the unfiltered_css capability.

Fixes #35395

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r38829 r39016  
    321321            $caps[] = 'do_not_allow';
    322322        break;
     323    case 'unfiltered_css' :
    323324    case 'unfiltered_html' :
    324325        // Disallow unfiltered_html for all users, even admins and super admins.
     
    328329            $caps[] = 'do_not_allow';
    329330        else
    330             $caps[] = $cap;
    331         break;
    332     case 'unfiltered_css' :
    333         $caps[] = 'unfiltered_html';
     331            $caps[] = 'unfiltered_html';
    334332        break;
    335333    case 'edit_files':
  • trunk/tests/phpunit/tests/user/capabilities.php

    r39008 r39016  
    230230            'edit_post_tags'         => array( 'administrator', 'editor' ),
    231231            'delete_post_tags'       => array( 'administrator', 'editor' ),
     232            'unfiltered_css'         => array( 'administrator', 'editor' ),
    232233
    233234            'assign_categories'      => array( 'administrator', 'editor', 'author', 'contributor' ),
     
    248249            'upload_plugins'         => array(),
    249250            'upload_themes'          => array(),
     251            'unfiltered_css'         => array(),
    250252
    251253            'customize'              => array( 'administrator' ),
     
    392394            $expected['unfiltered_upload'],
    393395            $expected['unfiltered_html'],
    394             $expected['unfiltered_css'],
    395396            $expected['edit_files'],
    396397            $expected['edit_plugins'],
Note: See TracChangeset for help on using the changeset viewer.