[wp-trac] [WordPress Trac] #49490: Missing wrapper function and action hook for new attachments
WordPress Trac
noreply at wordpress.org
Wed Apr 22 08:40:46 UTC 2020
#49490: Missing wrapper function and action hook for new attachments
-------------------------------------+-------------------------------------
Reporter: luisrivera | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 5.5
Component: Media | Version:
Severity: normal | Resolution:
Keywords: needs-design dev- | Focuses: rest-api, performance,
feedback 2nd-opinion needs-patch | coding-standards
-------------------------------------+-------------------------------------
Comment (by luisrivera):
Sorry for the spam but...
Wow! Just noticed this was added to Milestone
Feeling so proud about being able to get involved in such a big project
and giving back to this amazing community!
As I mentioned in Slack, I'm pretty sure that attachments are the most
used post-type in 99% of WP sites. It has always seemed very strange to me
that the absence of proper hooks in the attachment creation process could
have been ignored all this time.
My boilerplate should work as is but maybe someone more involved in core-
media should double check that I'm not missing anything important. I tried
to cover most scenarios I've come across while developing projects where I
use WP as a headless rest-api provider.
I think this little improvement will open a world of opportunities for
developers, specially the ones building media plugins or the ones trying
to integrate WP REST Api. I believe having a fully hookable core is the
key for removing any compromises that may exist in the use of our REST
api. This will keep WP ahead for the years to come.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49490#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list