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


Built from https://develop.svn.wordpress.org/trunk@27980


git-svn-id: http://core.svn.wordpress.org/trunk@27810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-04-07 06:20:16 +00:00
parent 2c88f6e941
commit 10b80870ee
2 changed files with 2 additions and 2 deletions

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;
}

File diff suppressed because one or more lines are too long