Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/24/2012 08:29:20 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Bozo:

  • Map 'bozo' caps to disallow for moderators.
  • Move inactive user check out of bbp_is_user_bozo() and into bbp_map_meta_caps().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-core-caps.php

    r4168 r4173  
    379379    // What capability is being checked?
    380380    switch ( $cap ) {
     381
     382        /** General ***********************************************************/
     383
     384        case 'bozo' :
     385
     386            // Inactive users are not bozos
     387            if ( bbp_is_user_inactive( $user_id ) ) {
     388                $caps = array( 'do_not_allow' );
     389
     390            // Moderators are not bozos
     391            } elseif ( user_can( $user_id, 'moderate' ) ) {
     392                $caps = array( 'do_not_allow' );
     393            }
     394
     395            break;
    381396
    382397        /** Reading ***********************************************************/
Note: See TracChangeset for help on using the changeset viewer.