Changeset 8174 for trunk/bp-members/bp-members-functions.php
- Timestamp:
- 03/27/2014 06:02:00 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/bp-members/bp-members-functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-functions.php
r8170 r8174 602 602 * @param int $user_id The ID of the user being spammed/hammed. 603 603 * @param string $status 'spam' if being marked as spam, 'ham' otherwise. 604 */ 605 function bp_core_process_spammer_status( $user_id, $status ) { 604 * @param bool $do_wp_cleanup True to force the cleanup of WordPress content 605 * and status, otherwise false. Generally, this should only be false if 606 * WordPress is expected to have performed this cleanup independently, 607 * as when hooked to 'make_spam_user'. 608 * @return bool True on success, false on failure. 609 */ 610 function bp_core_process_spammer_status( $user_id, $status, $do_wp_cleanup = true ) { 606 611 global $wpdb; 607 612 … … 632 637 633 638 // When marking as spam in the Dashboard, these actions are handled by WordPress 634 if ( ! $is_admin) {639 if ( $do_wp_cleanup ) { 635 640 636 641 // Get the blogs for the user … … 690 695 */ 691 696 function bp_core_mark_user_spam_admin( $user_id ) { 692 bp_core_process_spammer_status( $user_id, 'spam' );697 bp_core_process_spammer_status( $user_id, 'spam', false ); 693 698 } 694 699 add_action( 'make_spam_user', 'bp_core_mark_user_spam_admin' ); … … 702 707 */ 703 708 function bp_core_mark_user_ham_admin( $user_id ) { 704 bp_core_process_spammer_status( $user_id, 'ham' );709 bp_core_process_spammer_status( $user_id, 'ham', false ); 705 710 } 706 711 add_action( 'make_ham_user', 'bp_core_mark_user_ham_admin' );
Note: See TracChangeset
for help on using the changeset viewer.