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:
parent
559cccfdd1
commit
d534c8c3eb
@ -189,6 +189,10 @@
|
||||
shortcode = {};
|
||||
|
||||
if ( 'video' === type ) {
|
||||
if ( attachment.image ) {
|
||||
shortcode.poster = attachment.image.src;
|
||||
}
|
||||
|
||||
if ( attachment.width ) {
|
||||
shortcode.width = attachment.width;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user