Make WordPress Core

Changeset 38695


Ignore:
Timestamp:
09/30/2016 10:05:30 PM (8 years ago)
Author:
johnbillion
Message:

Role/Capability: Add explicit cases to map_meta_cap() for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.

Fixes #38201

File:
1 edited

Legend:

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

    r38378 r38695  
    403403        $caps[] = 'manage_options';
    404404        break;
     405    case 'create_sites':
     406    case 'delete_sites':
     407    case 'manage_network':
     408    case 'manage_sites':
     409    case 'manage_network_users':
     410    case 'manage_network_plugins':
     411    case 'manage_network_themes':
     412    case 'manage_network_options':
     413        $caps[] = $cap;
     414        break;
    405415    default:
    406416        // Handle meta capabilities for custom post types.
Note: See TracChangeset for help on using the changeset viewer.