Make WordPress Core

Changeset 27980


Ignore:
Timestamp:
04/07/2014 06:19:51 AM (9 years ago)
Author:
wonderboymusic
Message:

Only set the poster attribute automatically for videos when the image does not match the default mime-type icon. wp_prepare_attachment_for_js() is used in multiple contexts. This context requires disambiguation.

See [27659].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-editor.js

    r27979 r27980  
    190190
    191191            if ( 'video' === type ) {
    192                 if ( attachment.image ) {
     192                if ( attachment.image && -1 === attachment.image.src.indexOf( attachment.icon ) ) {
    193193                    shortcode.poster = attachment.image.src;
    194194                }
Note: See TracChangeset for help on using the changeset viewer.