PluginProbe
Elementor Website Builder – more than just a page builder / 3.20.0-dev3
Elementor Website Builder – more than just a page builder v3.20.0-dev3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | includes/embed.php +7 -10 4.1.53.20.0-dev3 View file →
@@ -9,9 +9,9 @@
9 9 * Elementor embed.
10 10 *
11 11 * Elementor embed handler class is responsible for Elementor embed functionality.
12 12 * The class holds the supported providers with their embed patters, and handles
13 - * their custom properties to create custom HTML with the embedded content.
13 + * their custom properties to create custom HTML with the embeded content.
14 14 *
15 15 * @since 1.5.0
16 16 */
17 17 class Embed {
@@ -27,9 +27,9 @@
27 27 *
28 28 * @var array Provider URL structure regex.
29 29 */
30 30 private static $provider_match_masks = [
31 - 'youtube' => '/^.*(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user|shorts)\/))([^\?&\"\'>]+)/',
31 + 'youtube' => '/^.*(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^\?&\"\'>]+)/',
32 32 'vimeo' => '/^.*vimeo\.com\/(?:[a-z]*\/)*([‌​0-9]{6,11})[?]?.*/',
33 33 'dailymotion' => '/^.*dailymotion.com\/(?:video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/',
34 34 'videopress' => [
35 35 '/^(?:http(?:s)?:\/\/)?videos\.files\.wordpress\.com\/([a-zA-Z\d]{8,})\//i',
@@ -196,12 +196,8 @@
196 196 } else {
197 197 $default_frame_attributes['data-lazy-load'] = $video_embed_url;
198 198 }
199 199
200 - if ( isset( $embed_url_params['autoplay'] ) ) {
201 - $default_frame_attributes['allow'] = 'autoplay';
202 - }
203 -
204 200 $frame_attributes = array_merge( $default_frame_attributes, $frame_attributes );
205 201
206 202 $attributes_for_print = [];
207 203
@@ -226,10 +222,10 @@
226 222 /**
227 223 * Get oembed data from the cache.
228 224 * if not exists in the cache it will fetch from provider and then save to the cache.
229 225 *
230 - * @param string $oembed_url
231 - * @param string $cached_post_id
226 + * @param $oembed_url
227 + * @param $cached_post_id
232 228 *
233 229 * @return array|null
234 230 */
235 231 public static function get_oembed_data( $oembed_url, $cached_post_id ) {
@@ -257,9 +253,10 @@
257 253
258 254 /**
259 255 * Fetch oembed data from oembed provider.
260 256 *
261 - * @param string $oembed_url
257 + * @param $oembed_url
258 + *
262 259 * @return array|null
263 260 */
264 261 public static function fetch_oembed_data( $oembed_url ) {
265 262 $oembed_data = _wp_oembed_get_object()->get_data( $oembed_url );
@@ -274,9 +271,9 @@
274 271 ];
275 272 }
276 273
277 274 /**
278 - * @param string $oembed_url
275 + * @param $oembed_url
279 276 * @param null|string|int $cached_post_id
280 277 *
281 278 * @return string|null
282 279 */