mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user