Making WordPress.org

Changeset 13326

Timestamp:
03/14/2024 02:09:09 AM (5 months ago)
Author:
dd32
Message:

Registration: When blocking multiple users, remove the filter after the block, not as part of the filter, as the $callback will be incorrect.

H/t Otto42.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-login/admin/ui.php

    r13217 r13326  
    515515        WordPressdotorg\Forums\Plugin::get_instance();
    516516
    517         $callback = function( $text ) use ( $callback, $reason, $meta_column ) {
    518             remove_filter( 'wporg_bbp_forum_role_changed_note_text', $callback );
    519 
     517        $callback = function( $text, $filter_user = false ) use ( $reason, $meta_column ) {
    520518            return trim( "{$reason}\n{$meta_column}\n\n{$text}" );
    521519        };
     
    524522        // Set the user to blocked. Support forum hooks will take care of the rest.
    525523        bbp_set_user_role( $user->ID, bbp_get_blocked_role() );
     524
     525
    526526
    527527        restore_current_blog();
Note: See TracChangeset for help on using the changeset viewer.