[wp-trac] [WordPress Trac] #23148: Add hook in wp_ajax_save_attachment for additional attachment fields

WordPress Trac noreply at wordpress.org
Mon Mar 6 10:09:46 UTC 2023


#23148: Add hook in wp_ajax_save_attachment for additional attachment fields
-------------------------------------------------+-------------------------
 Reporter:  griffinjt                            |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.2
Component:  Media                                |     Version:  3.5
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion dev-feedback   |     Focuses:
  needs-dev-note needs-docs                      |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Replying to [comment:54 peterwilsoncc]:
 > I could be convinced either way but I kind of agree with Aaron here,
 that it doubles up a lot of actions from the `wp_insert_post()` function.
 Documenting the use of `doing_action( 'wp_ajax_save-attachment' )` adds to
 the confusion, as that seems something that can be done in the existing
 hooks.

 Indeed, this looks a lot like #28112 to me, where the `bulk_edit_posts`
 hook was reverted in [55265] pending confirmation it is actually needed,
 especially after the ticket reporter has apparently been able to achieve
 the goal using the existing hooks.

 Reopening to either further improve the docs as suggested in comment:52,
 or revert for now and move to 6.3 to get a better idea of whether this
 hook is needed, and how it should be implemented.

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


More information about the wp-trac mailing list