Media: Add action to display attachments on the edit screen.

This adds a new action hook, `wp_edit_form_attachment_display` to
`edit_form_image_editor()`, which can be used as a fallback to render
previews of an attachment that isn't an image, audio, or video file
included in the media library.

Props georgestephanis.
Fixes #36502.

git-svn-id: https://develop.svn.wordpress.org/trunk@37879 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Joe McGill 2016-06-26 22:37:00 +00:00
parent 095c705ffa
commit 726057bc41
1 changed files with 11 additions and 0 deletions

View File

@ -2766,6 +2766,17 @@ function edit_form_image_editor( $post ) {
echo wp_video_shortcode( $attr );
else :
/**
* Fires when attachment type can't be rendered in the edit form.
*
* @since 4.6.0
*
* @param WP_Post A post object.
*/
do_action( 'wp_edit_form_attachment_display', $post );
endif; ?>
</div>
<div class="wp_attachment_details edit-form-section">