[wp-trac] [WordPress Trac] #65086: Add action hooks to media modal attachment details templates for field extensibility
WordPress Trac
noreply at wordpress.org
Fri Apr 17 09:22:06 UTC 2026
#65086: Add action hooks to media modal attachment details templates for field
extensibility
-------------------------+-----------------------------
Reporter: kaavyaiyer | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Since WP 7.0 ships with a built-in AI client, there is a need for AI-
powered features like alt text generation to be able to place controls
(e.g., a "Generate" button) directly next to the fields they act on within
the media modal.
Currently, {{{wp-includes/media-template.php}}} does not provide any hooks
inside the attachment details templates where fields like Alternative Text
are rendered. This leaves JavaScript DOM manipulation as a workaround to
place controls directly next to existing fields.
The first concrete use case is the [https://github.com/WordPress/ai] alt
text generation experiment, which needs a "Generate" button next to the
Alternative Text textarea. See:
[https://github.com/WordPress/ai/issues/425 WordPress/ai#425] for the
original discussion.
== Proposed Solution
Add action hooks inside the two attachment details Backbone templates in
{{{media-template.php}}}
=== Extending to other fields
Beyond the media modal, similar hooks would benefit other areas of the
admin where AI features need to place controls next to existing fields for
title, image, caption generation, etc. This ticket focuses on the media
modal as the starting point.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65086>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list