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:
parent
86f4061b26
commit
16f93f3952
|
@ -189,6 +189,10 @@
|
||||||
shortcode = {};
|
shortcode = {};
|
||||||
|
|
||||||
if ( 'video' === type ) {
|
if ( 'video' === type ) {
|
||||||
|
if ( attachment.image ) {
|
||||||
|
shortcode.poster = attachment.image.src;
|
||||||
|
}
|
||||||
|
|
||||||
if ( attachment.width ) {
|
if ( attachment.width ) {
|
||||||
shortcode.width = attachment.width;
|
shortcode.width = attachment.width;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -295,6 +295,7 @@ audio {
|
||||||
border-color: rgba(0,0,0,0.3);
|
border-color: rgba(0,0,0,0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wpview-type-video .track-details,
|
||||||
.wpview-type-audio .track-details {
|
.wpview-type-audio .track-details {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
Loading…
Reference in New Issue