WordPress.org

Make WordPress Core

Changeset 37879


Ignore:
Timestamp:
06/26/2016 10:37:00 PM (4 years ago)
Author:
joemcgill
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r37537 r37879  
    27672767        echo wp_video_shortcode( $attr );
    27682768
     2769    else :
     2770
     2771        /**
     2772         * Fires when attachment type can't be rendered in the edit form.
     2773         *
     2774         * @since 4.6.0
     2775         *
     2776         * @param WP_Post A post object.
     2777         */
     2778        do_action( 'wp_edit_form_attachment_display', $post );
     2779
    27692780    endif; ?>
    27702781    </div>
Note: See TracChangeset for help on using the changeset viewer.