[wp-trac] [WordPress Trac] #28112: bulk_edit_posts() function needs an action hook

WordPress Trac noreply at wordpress.org
Sun Jun 18 13:24:07 UTC 2023


#28112: bulk_edit_posts() function needs an action hook
-------------------------------------------------+-------------------------
 Reporter:  helgatheviking                       |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.3
Component:  Quick/Bulk Edit                      |     Version:  3.9
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch dev-feedback needs-        |     Focuses:
  testing has-testing-info                       |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:50 oglekler]:
 > I changed my mind, I think we should add this action, it can be useful.

 Fair enough :)

 But the current patch still conflates two different data sets, as noted in
 comment:32:
 * The submitted form data
 * Some data for the last post in the loop

 This can be confusing for developers, as they might assume all the data
 applies to all posts, whereas some of it in fact only applies to the last
 one. Moreover, the list of post IDs can be incorrect, as some of the posts
 might be skipped and not updated because they are locked or due to
 insufficient permissions.

 If we're going to implement this hook, I believe it should receive:
 * The list of post IDs which were actually updated
 * The submitted form data that applies to all of the updated posts

 Would [attachment:"28112.4.diff"] address the potential use cases here?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/28112#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list