WordPress.org

Make WordPress Core

Changeset 20534


Ignore:
Timestamp:
04/19/2012 02:05:05 PM (6 years ago)
Author:
nacin
Message:

Do not block file mod/edit caps when DISALLOW_UNFILTERED_HTML is set. There are separate constants (DISALLOW_FILE_EDIT and DISALLOW_FILE_MODS for those). fixes #20488.

File:
1 edited

Legend:

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

    r20378 r20534  
    11251125            $caps[] = 'do_not_allow';
    11261126        break;
     1127    case 'unfiltered_html' :
     1128        // Disallow unfiltered_html for all users, even admins and super admins.
     1129        if ( defined( 'DISALLOW_UNFILTERED_HTML' ) && DISALLOW_UNFILTERED_HTML )
     1130            $caps[] = 'do_not_allow';
     1131        else
     1132            $caps[] = $cap;
     1133        break;
    11271134    case 'edit_files':
    11281135    case 'edit_plugins':
     
    11471154        }
    11481155        // Fall through if not DISALLOW_FILE_MODS.
    1149     case 'unfiltered_html':
    1150         // Disallow unfiltered_html for all users, even admins and super admins.
    1151         if ( defined('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML ) {
    1152             $caps[] = 'do_not_allow';
    1153             break;
    1154         }
    1155         // Fall through if not DISALLOW_UNFILTERED_HTML
    11561156    case 'delete_user':
    11571157    case 'delete_users':
Note: See TracChangeset for help on using the changeset viewer.