Skip to:
Content

bbPress.org

Changeset 4173


Ignore:
Timestamp:
08/24/2012 08:29:20 AM (14 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().
Location:
branches/plugin/bbp-includes
Files:
2 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 ***********************************************************/
  • branches/plugin/bbp-includes/bbp-user-functions.php

    r4170 r4173  
    13851385        return false;
    13861386
    1387     // Inactive users are not bozos
    1388     if ( bbp_is_user_inactive( $user_id ) )
    1389         return false;
    1390 
    13911387    // Return if a user has the bozo capability
    13921388    return (bool) apply_filters( 'bbp_is_user_bozo', user_can( $user_id, 'bozo' ), $user_id );
Note: See TracChangeset for help on using the changeset viewer.