As #394496: Add ability to bulk update nodes with adding terms is only one use case of extending the node mass update functionalities, I suggest to extend the whole hook_node_operations.
By extending I mean providing an additional key callback form, that defines the form function that would be called after selecting the update option. (eventually this even could deal with ahah).

So the form might be like function node_operation_delete_form(&$form_state, $callback_arguments) . It could be used to alter the callback arguments before data is send to the callback. Or additionall the form could use its own submit function.

Please leave a comment for this approach.

As this issue is a follow-up by d7uxsprint I tagged it so.

Comments

derhasi’s picture

Status: Active » Needs review
StatusFileSize
new6.33 KB

With the attached patch I added a new property "callback is form" to hook_node_operations. So now, when this is set to TRUE, the callback is called as form (function node_operation_callback(&$form_state, $nodes, $arguments)).
For that little API change, the delete node operation had to change a little. I also changed the node.api.php for documentation.

derhasi’s picture

StatusFileSize
new6.35 KB

Sorry, forgot to look on code style.

Status: Needs review » Needs work

The last submitted patch failed testing.

derhasi’s picture

Status: Needs work » Closed (won't fix)