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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-03-23 03:36:15 +00:00
parent 86f4061b26
commit 16f93f3952
3 changed files with 6 additions and 1 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;
}

File diff suppressed because one or more lines are too long

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;