hooks: custom status to match custom action?
-
I just want to make sure I’m not missing something before submitting a feature request to your github.
The statuses seem to be hard coded: class-user.php#L992
Assuming there’s no way of doing this that I’ve overlooked, a hook here is needed for adding new statuses for custom actions.
For example:
I don’t want to allow subadmins to delete users, but I do want them to be able to mark users for deletion, which I will perform later if I agree with them.
I have the status and role change working with:add_action( "um_admin_custom_hook_um_mark_for_deletion", function( $user_id ) { update_user_meta($user_id, 'account_status', 'inactive'); UM()->roles()->set_role( $user_id, 'um_for-deletion' ); });
But, I either have to use an existing status and description, such as inactive (Membership Inactive), or add a new line to class-user.php to have my subadmins see “For Deletion” or similar, and of course I have to add this after plugin updates.
Perhaps this was just an oversight? Hooks are provided for adding custom actions, but we can’t add statuses and descriptions to match?
This can cause confusion, not to mention poor aesthetics, in the case of a custom action in the bulk dropdown that has little or nothing to do with any of the stock statuses.
- The topic ‘hooks: custom status to match custom action?’ is closed to new replies.