PluginProbe
Depicter — Popup & Slider Builder / 1.9.2
Depicter — Popup & Slider Builder v1.9.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
← All changes | app/src/Document/Models/Elements/EmbedVideo.php +3 -8 1.3.51.9.2 View file →
@@ -5,17 +5,12 @@
5 5 use Averta\Core\Utility\Embed;
6 6 use Depicter\Document\Models;
7 7 use Depicter\Html\Html;
8 8
9 -class EmbedVideo extends Models\Element
10 -{
9 +class EmbedVideo extends Models\Element{
11 10
12 11 public function render() {
13 12
14 -// if ( empty( $this->options->source ) || false == $videoSrc = wp_get_attachment_url( $this->options->source ) ) {
15 -// return '';
16 -// }
17 -
18 13 $videoUrl = !empty( $this->options->source ) ? $this->options->source : '';
19 14
20 15 $elementsAttrs = [
21 16 'data-type' => 'video'
@@ -65,9 +60,9 @@
65 60
66 61 protected function getYouTubeEmbed( $videoUrl ){
67 62 $embed = '';
68 63
69 - if( $embedUrl = Embed::getYouTubeEmbedUrl( $videoUrl ) ){
64 + if( $embedUrl = Embed::getYouTubeVimeoEmbedUrl( $videoUrl ) ){
70 65 $queryParams = [];
71 66 if( isset( $this->options->autoPlay ) ){
72 67 $queryParams['autoplay'] = (int) $this->options->autoPlay;
73 68 }
@@ -99,9 +94,9 @@
99 94
100 95 protected function getVimeoEmbed( $videoUrl ){
101 96 $embed = '';
102 97
103 - if( $embedUrl = Embed::getVimeoEmbedUrl( $videoUrl ) ){
98 + if( $embedUrl = Embed::getYouTubeVimeoEmbedUrl( $videoUrl ) ){
104 99
105 100 $queryParams = [];
106 101
107 102 if( isset( $this->options->autoPlay ) ){