Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -3270,6 +3270,12 @@ function edit_form_image_editor( $post ) {

?>
</p>
<?php
/**
* Fires after the Alt Text field in the attachment details template.
*/
do_action( 'attachment_details_after_alt_text' );
?>
<?php endif; ?>

<p>
Expand All @@ -3278,6 +3284,10 @@ function edit_form_image_editor( $post ) {
</p>

<?php
/**
* Fires after the Caption field in the attachment details template.
*/
do_action( 'attachment_details_after_caption' );

$quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
$editor_args = array(
Expand Down Expand Up @@ -3308,6 +3318,13 @@ function edit_form_image_editor( $post ) {
</label>
<?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?>

<?php
/**
* Fires after the Description field in the attachment details template.
*/
do_action( 'attachment_details_after_description' );
?>

</div>
<?php

Expand Down
24 changes: 24 additions & 0 deletions src/wp-includes/media-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,24 @@ function wp_print_media_templates() {
<textarea id="attachment-details-two-column-alt-text" aria-describedby="alt-text-description" {{ maybeReadOnly }}>{{ data.alt }}</textarea>
</span>
<p class="description" id="alt-text-description"><?php echo $alt_text_description; ?></p>
<?php
/**
* Fires after the Alternative Text field in the two-column attachment details template.
*/
do_action( 'attachment_details_two_column_after_alt_text' );
?>
<# } #>
<?php if ( post_type_supports( 'attachment', 'title' ) ) : ?>
<span class="setting" data-setting="title">
<label for="attachment-details-two-column-title" class="name"><?php _e( 'Title' ); ?></label>
<input type="text" id="attachment-details-two-column-title" value="{{ data.title }}" {{ maybeReadOnly }} />
</span>
<?php
/**
* Fires after the Title field in the two-column attachment details template.
*/
do_action( 'attachment_details_two_column_after_title' );
?>
<?php endif; ?>
<# if ( 'audio' === data.type ) { #>
<?php
Expand All @@ -547,10 +559,22 @@ function wp_print_media_templates() {
<label for="attachment-details-two-column-caption" class="name"><?php _e( 'Caption' ); ?></label>
<textarea id="attachment-details-two-column-caption" {{ maybeReadOnly }}>{{ data.caption }}</textarea>
</span>
<?php
/**
* Fires after the Caption field in the two-column attachment details template.
*/
do_action( 'attachment_details_two_column_after_caption' );
?>
<span class="setting" data-setting="description">
<label for="attachment-details-two-column-description" class="name"><?php _e( 'Description' ); ?></label>
<textarea id="attachment-details-two-column-description" {{ maybeReadOnly }}>{{ data.description }}</textarea>
</span>
<?php
/**
* Fires after the Description field in the two-column attachment details template.
*/
do_action( 'attachment_details_two_column_after_description' );
?>
<span class="setting" data-setting="url">
<label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
<input type="text" class="attachment-details-copy-link ltr" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
Expand Down
Loading