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].



git-svn-id: https://develop.svn.wordpress.org/trunk@27980 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-04-07 06:19:51 +00:00
parent d11d19a2b7
commit f48e74e789
+1 -1
View File
@@ -189,7 +189,7 @@
shortcode = {};
if ( 'video' === type ) {
if ( attachment.image ) {
if ( attachment.image && -1 === attachment.image.src.indexOf( attachment.icon ) ) {
shortcode.poster = attachment.image.src;
}