When inserting a video shortcode into the editor, set the poster attribute automatically if the video has a featured image attached to it.

See #27460.



git-svn-id: https://develop.svn.wordpress.org/trunk@27659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-03-23 03:35:50 +00:00
parent 559cccfdd1
commit d534c8c3eb
2 changed files with 5 additions and 0 deletions

View File

@ -189,6 +189,10 @@
shortcode = {};
if ( 'video' === type ) {
if ( attachment.image ) {
shortcode.poster = attachment.image.src;
}
if ( attachment.width ) {
shortcode.width = attachment.width;
}

View File

@ -295,6 +295,7 @@ audio {
border-color: rgba(0,0,0,0.3);
}
.wpview-type-video .track-details,
.wpview-type-audio .track-details {
position: absolute;
top: 0;