WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm heavelly modified my Wordpress, it's amazing what you can do with wordpress hooks, actions.. But i'm not able to find how can i add mass action for users. Let's say i select 5 users and i want to asign them some user_meta value.

share|improve this question
up vote 3 down vote accepted

Unfortunately this isn't possible. Custom actions cannot be added to the bulk actions dropdown (see trac tickets: http://core.trac.wordpress.org/ticket/12732 and http://core.trac.wordpress.org/ticket/16031).

For posts you can use the restrict_manage_posts hook to create another drop-down / add buttons to trigger your custom action. But there is no restrict_manage_* hook available for the user table.

So the only (and not particularly pretty) workaround is to use javascript to insert extra options into the drop-down menu.

However, there is no (supported) way of handling the action - so this would also have to be handled yourself by hooking into the load-* or admin_action_* hook. (See the core files here).

You would then need to check the posted data (the user IDs, the action identifier, nonce, etc) inside that hook and then you would need to check the nonce and the current user's capability to perform that action.

See related question: Custom bulk_action

share|improve this answer
Thanks for bad news.. :D – Tommixoft Jun 4 '12 at 12:35
Another alternative, albeit also time consuming to implement, would be a custom built (secondary) user table in a custom admin menu, @Tommix. | +1 for sharing the tickets – Johannes Pille Jun 4 '12 at 13:10

It's possible by using jQuery to add the item to the drop down or adding another field and then use Ajax to intercept the click and perform your bulk action that way.

share|improve this answer
Here's an article on how to do it. – morphatic Aug 16 '15 at 23:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.