Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $postType = "post";
- add_filter("bulk_actions-edit-" . $postType, function ($actions) {
- $actions["specialSave"] = "Special save";
- return $actions;
- }, 20);
- add_filter("handle_bulk_actions-edit-" . $postType, function ($sendback, $doaction, $post_ids) {
- if ("specialSave" !== $doaction) {
- return;
- }
- foreach ($post_ids as $idPost) {
- // action to do for each selected post
- }
- return $sendback;
- }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement