If you have activated the content approval or even work with an approval workflow to approve items in your list or library you might have recognized that a bulk approval/rejection of items/documents is not possible. This blogpost shows how to create a possibility to bulk approve items/documents.
Therefore custom ribbon buttons are provided which call an application page (one per action, reject, approve, publish). The application page gets the selected items via query string parameter. The processing is done in the application pages, after the page closes the lists are refreshed.