alleyinteractive / wp-bulk-task

A library to assist with running performant bulk tasks against WordPress database objects.
GNU General Public License v2.0
13 stars 0 forks source link

Pass the current query object to the callback #27

Closed renatonascalves closed 4 months ago

renatonascalves commented 4 months ago

Description

The current query object is passed to the callback run into a batch.

https://github.com/alleyinteractive/wp-bulk-task/blob/6fc381cab4c0494b7695e97725a465d9007b7a13/src/class-bulk-task.php#L537

Use Case

A script might need access to the current query object to perform changes that might be needed inside the callback.

For example, a callback might have functions that require/depend on the query object to be present.

For Alley devs, see this thread.

Acceptance Criteria