Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/23/2012 06:18:39 AM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at adding user capabilities screen and action to settings component:

  • Add capabilities template
  • Unhook core spammer and deleted user actions and move to settings
  • Route admin bar links appropriately to new locations
  • Allow delete-account to be accessed by super admins in place of broken alerts
  • Improve general settings feedback
  • @todo - backpat post mortem
  • See #4038
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-adminbar.php

    r5704 r5829  
    110110
    111111    // User Admin > Spam/unspam
    112     if ( !bp_is_user_spammer( bp_displayed_user_id() ) ) {
    113         $wp_admin_bar->add_menu( array(
    114             'parent' => $bp->user_admin_menu_id,
    115             'id'     => $bp->user_admin_menu_id . '-spam-user',
    116             'title'  => __( 'Mark as Spammer', 'buddypress' ),
    117             'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer' ),
    118             'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as a spammer?', 'buddypress' ) . '");' )
    119         ) );
    120     } else {
    121         $wp_admin_bar->add_menu( array(
    122             'parent' => $bp->user_admin_menu_id,
    123             'id'     => $bp->user_admin_menu_id . '-unspam-user',
    124             'title'  => __( 'Not a Spammer', 'buddypress' ),
    125             'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/unmark-spammer/', 'mark-unmark-spammer' ),
    126             'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as not a spammer?', 'buddypress' ) . '");' )
    127         ) );
    128     }
     112    $wp_admin_bar->add_menu( array(
     113        'parent' => $bp->user_admin_menu_id,
     114        'id'     => $bp->user_admin_menu_id . '-user-capabilities',
     115        'title'  => __( 'User Capabilities', 'buddypress' ),
     116        'href'   => bp_displayed_user_domain() . 'settings/capabilities/'
     117    ) );
    129118
    130119    // User Admin > Delete Account
     
    133122        'id'     => $bp->user_admin_menu_id . '-delete-user',
    134123        'title'  => __( 'Delete Account', 'buddypress' ),
    135         'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user' ),
    136         'meta'   => array( 'onclick' => 'confirm(" ' . __( "Are you sure you want to delete this user's account?", 'buddypress' ) . '");' )
     124        'href'   => bp_displayed_user_domain() . 'settings/delete-account/'
    137125    ) );
    138126}
Note: See TracChangeset for help on using the changeset viewer.