Filter: um_handle_bulk_actions-users-{$current_action}

apply_filters( 'um_handle_bulk_actions-users-{$current_action}', $sendback, $userids ) → {string}

Fires when a custom Ultimate Member bulk action for wp-admin > Users list table should be handled.

The redirect link should be modified with success or failure feedback from the action to be used to display feedback to the user.

The dynamic portion of the hook name, $current_action, refers to the current bulk action. Use together with custom actions added via um_admin_bulk_user_actions_hook hook.

Parameters:
Name Type Description
$sendback string

The redirect URL.

$userids array

Selected users in bulk action.

Since:
  • 2.8.7
Source:
Returns:

The redirect URL.

Type
string
Example

Handle custom-action and set redirect after it.

function um_custom_bulk_actions_users( $sendback, $userids ) {
    foreach ( $userids as $user_id ) {
        // make some action here
    }
    return add_query_arg( 'action_counter', 'completed action count', $sendback );
}
add_filter( 'um_handle_bulk_actions-users-custom-action', 'um_custom_bulk_actions_users' );