Changes between Version 1 and Version 2 of Ticket #16031, comment 97
- Timestamp:
- 10/13/2016 05:06:52 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16031, comment 97
v1 v2 2 2 > These should either be statically named hooks, or a better way of clearly passing different formats and number of data to the hooks is needed. 3 3 4 We can't statically name the hooks in the current implementation, as some of the hooks are covering multiple screens. eg. the [https://github.com/WordPress/WordPress/blob/acd764a1d3e599797a5d875f5721f76f81638cf9/wp-admin/edit.php#L178 edit.php handle_bulk_actions-* hook] invokes `handle_bulk_actions-edit-post`, `handle_bulk_actions-edit-page` and ` `handle_bulk_actions-my-custom-post-type`.4 We can't statically name the hooks in the current implementation, as some of the hooks are covering multiple screens. eg. the [https://github.com/WordPress/WordPress/blob/acd764a1d3e599797a5d875f5721f76f81638cf9/wp-admin/edit.php#L178 edit.php handle_bulk_actions-* hook] invokes `handle_bulk_actions-edit-post`, `handle_bulk_actions-edit-page` and `handle_bulk_actions-my-custom-post-type`. 5 5 6 6 If we want statically named hooks here, perhaps we could change all hooks to use a single hook, `handle_bulk_actions`, and expect developers to perform the screen check in their callback. Since different screens will include different contextual data, perhaps we consolidate it in an array in a `$context` argument. eg.