Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2015 01:58:52 AM (9 years ago)
Author:
tw2113
Message:

More documentation cleanup for the Members component.

See #6402.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-actions.php

    r10149 r10322  
    11<?php
    22/**
    3  * BuddyPress Members Actions
     3 * BuddyPress Members Actions.
    44 *
    55 * Action functions are exactly the same as screen functions, however they do not
     
    2828
    2929    // Only super admins can currently spam users (but they can't spam
    30     // themselves)
     30    // themselves).
    3131    if ( ! is_super_admin() || bp_is_my_profile() ) {
    3232        return;
    3333    }
    3434
    35     // Use displayed user if it's not yourself
     35    // Use displayed user if it's not yourself.
    3636    if ( empty( $user_id ) )
    3737        $user_id = bp_displayed_user_id();
     
    3939    if ( bp_is_current_component( 'admin' ) && ( in_array( bp_current_action(), array( 'mark-spammer', 'unmark-spammer' ) ) ) ) {
    4040
    41         // Check the nonce
     41        // Check the nonce.
    4242        check_admin_referer( 'mark-unmark-spammer' );
    4343
    44         // To spam or not to spam
     44        // To spam or not to spam.
    4545        $status = bp_is_current_action( 'mark-spammer' ) ? 'spam' : 'ham';
    4646
    47         // The heavy lifting
     47        // The heavy lifting.
    4848        bp_core_process_spammer_status( $user_id, $status );
    4949
    50         // Add feedback message. @todo - Error reporting
     50        // Add feedback message. @todo - Error reporting.
    5151        if ( 'spam' == $status ) {
    5252            bp_core_add_message( __( 'User marked as spammer. Spam users are visible only to site admins.', 'buddypress' ) );
     
    5959        do_action( 'bp_core_action_set_spammer_status', bp_displayed_user_id(), $is_spam );
    6060
    61         // Redirect back to where we came from
     61        // Redirect back to where we came from.
    6262        bp_core_redirect( wp_get_referer() );
    6363    }
    6464}
    65 // Unhooked in 1.6.0 - moved to settings
    66 //add_action( 'bp_actions', 'bp_core_action_set_spammer_status' );
     65
     66/*
     67 * Unhooked in 1.6.0 - moved to settings.
     68 * add_action( 'bp_actions', 'bp_core_action_set_spammer_status' );
     69 */
    6770
    6871/**
     
    7881    if ( bp_is_current_component( 'admin' ) && bp_is_current_action( 'delete-user' ) ) {
    7982
    80         // Check the nonce
     83        // Check the nonce.
    8184        check_admin_referer( 'delete-user' );
    8285
     
    99102    }
    100103}
    101 // Unhooked in 1.6.0 - moved to settings
    102 //add_action( 'bp_actions', 'bp_core_action_delete_user' );
     104
     105/*
     106 * Unhooked in 1.6.0 - moved to settings
     107 * add_action( 'bp_actions', 'bp_core_action_delete_user' );
     108 */
    103109
    104110/**
Note: See TracChangeset for help on using the changeset viewer.