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

WordPress Trac noreply at wordpress.org
Mon Feb 27 22:27:59 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  |     Focuses:
-----------------------------------+-----------------------

Comment (by sc0ttkclark):

 Replying to [comment:40 azaozz]:
 > But if something is not used in core, and seems nobody needed it for 10
 years, and WP will have to maintain it forever (even if only 2-3 plugins
 will ever use it), I'm not sure it is a good idea to add it.

 I'll concede there that since before this ticket was created -- all plugin
 developers looking to integrate in this area have been using workarounds
 to make it all work. So now we're looking at 10+ years of code in these
 plugins and it would be slow going for those existing plugins to switch to
 the better hook.

 I don't know how many plugin authors will recognize this new hook is a
 better replacement for what they had used and that ultimately will lead to
 a slow adoption. They most likely already forgot about why they used their
 workaround (unless they left code comments) and will leave that code in
 place. They won't change it because their old solution works just fine for
 them.

 But the new developers / projects, they have a chance at having a better
 life than us :)

 I still think it would be the right way to handle this sort of thing.
 Otherwise, doing a `doing_action()` would be the right way to handle most
 secondary and tertiary customizations without any other context available.

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


More information about the wp-trac mailing list