I am adding a bulk action assign
just like delete
.
add_filter( 'bulk_actions-users', array( $this, 'add_bulk_action' ) );
/**
* Add Bulk Assign Action.
* @param array $actions Current Actions.
* @return array All Actions along with assign action.
*/
public function add_bulk_action( $actions ) {
$actions['assign'] = __( 'Assign', 'wp-assign' );
return $actions;
}
However, while trying to trigger the assign action, I am not being able to get the users selected with checkbox.
add_action( 'load-users.php', array( $this, 'trigger_bulk_actions' ) );
public function trigger_query_actions() {
print_r( $_REQUEST );
}
While triggering the delete action I can get users in $_REQUEST
[12-Oct-2018 13:36:56 UTC] Array
(
[s] =>
[_wpnonce] => c48578ebab
[_wp_http_referer] => /professional/wp-admin/users.php?delete_count=18
[action] => delete
[new_role] =>
[paged] => 1
[users] => Array
(
[0] => 1
)
[action2] => -1
[new_role2] =>
)
Why am I not getting users in my custom assign
action?
Thanks!