The development team of WordPress 4.7, led by Helen Hou-Sandí, are hard at work. In an effort to make the next big release of WordPress better, the team are working not only to add new features but also improve the short comings of the past versions. Yesterday, Eric Andrew Lewis joyously announced on the make blog that WordPress 4.7 will allow for custom bulk actions in admin list tables, an exciting new feature for developers.
Lewis posted this WordPress 4.7 news with a sample code walk-through of the steps required for adding a new option to the dropdown, handling a bulk action form submission, and displaying notices to inform users of what happened. The announcement was well-received by developers as this functionality has been in high demands. Developers are elated to make use of the new ability to register their own bulk actions as they no longer have to rely on hacks.
List tables are found on various screens throughout the admin. Bulk actions are the drop-downs that let users perform actions such as activate or deactivate plugins in bulk, move multiple posts to the trash, and bulk delete media items.
The ability for developers to filter bulk actions was introduced in 3.1 but it didn’t offer much flexibility. Up until 4.7, it only allowed for the removal of items from default bulk actions. The upcoming release will make it possible for developers to register new bulk actions for any admin list table drop-down, including the Attachments list table.
This small, yet important change resolves a six-year-old ticket and has the potential to impact many plugins. For example, the Custom Bulk Actions plugin has been rendered obsolete, as core now provides a better standard. There are many other plugins that register bulk actions through a similar method or another type of hack, but WordPress 4.7 will offer an easier, core-supported way to accomplish this.