ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) - Version 8.10.5

Version Description

Download this release

Release Info

Developer nico23
Plugin Icon 128x128 ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …)
Version 8.10.5
Comparing to
See all releases

Code changes from version 8.10.3 to 8.10.5

admin/functions-admin.php CHANGED
@@ -568,7 +568,6 @@ function arve_validate_options_main( $input ) {
568
 
569
  $output['always_enqueue_assets'] = ( 'yes' == $input['always_enqueue_assets'] ) ? true : false;
570
  $output['autoplay'] = ( 'yes' == $input['autoplay'] ) ? true : false;
571
- $output['iframe_flash'] = ( 'yes' == $input['iframe_flash'] ) ? true : false;
572
  $output['promote_link'] = ( 'yes' == $input['promote_link'] ) ? true : false;
573
  $output['wp_video_override'] = ( 'yes' == $input['wp_video_override'] ) ? true : false;
574
  $output['youtube_nocookie'] = ( 'yes' == $input['youtube_nocookie'] ) ? true : false;
568
 
569
  $output['always_enqueue_assets'] = ( 'yes' == $input['always_enqueue_assets'] ) ? true : false;
570
  $output['autoplay'] = ( 'yes' == $input['autoplay'] ) ? true : false;
 
571
  $output['promote_link'] = ( 'yes' == $input['promote_link'] ) ? true : false;
572
  $output['wp_video_override'] = ( 'yes' == $input['wp_video_override'] ) ? true : false;
573
  $output['youtube_nocookie'] = ( 'yes' == $input['youtube_nocookie'] ) ? true : false;
advanced-responsive-video-embedder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ARVE Advanced Responsive Video Embedder
4
  * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/
5
  * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
6
- * Version: 8.10.3
7
  * Author: Nicolas Jonas
8
  * Author URI: https://nextgenthemes.com
9
  * License: GPL-3.0
@@ -19,7 +19,7 @@ if ( ! defined( 'WPINC' ) ) {
19
  }
20
 
21
  define( 'ARVE_SLUG', 'advanced-responsive-video-embedder' );
22
- define( 'ARVE_VERSION', '8.10.3' );
23
  define( 'ARVE_PRO_VERSION_REQUIRED', '4.2.5' );
24
 
25
  define( 'ARVE_URL', plugin_dir_url( __FILE__ ) );
3
  * Plugin Name: ARVE Advanced Responsive Video Embedder
4
  * Plugin URI: https://nextgenthemes.com/plugins/arve-pro/
5
  * Description: Easy responsive video embeds via URL (like WordPress) or Shortcodes. Supports almost anything you can imagine.
6
+ * Version: 8.10.4
7
  * Author: Nicolas Jonas
8
  * Author URI: https://nextgenthemes.com
9
  * License: GPL-3.0
19
  }
20
 
21
  define( 'ARVE_SLUG', 'advanced-responsive-video-embedder' );
22
+ define( 'ARVE_VERSION', '8.10.4' );
23
  define( 'ARVE_PRO_VERSION_REQUIRED', '4.2.5' );
24
 
25
  define( 'ARVE_URL', plugin_dir_url( __FILE__ ) );
public/functions-html-output.php CHANGED
@@ -92,10 +92,10 @@ function arve_build_meta_html( $a ) {
92
  array(
93
  'name' => 'thumbnail',
94
  'tag' => 'meta',
95
- 'attr' => [
96
  'itemprop' => 'thumbnailUrl',
97
  'content' => $a['img_src'],
98
- ],
99
  ),
100
  $a
101
  );
@@ -108,10 +108,10 @@ function arve_build_meta_html( $a ) {
108
  array(
109
  'name' => 'title',
110
  'tag' => 'meta',
111
- 'attr' => [
112
  'itemprop' => 'name',
113
  'content' => trim( $a['title'] ),
114
- ]
115
  ),
116
  $a
117
  );
92
  array(
93
  'name' => 'thumbnail',
94
  'tag' => 'meta',
95
+ 'attr' => array(
96
  'itemprop' => 'thumbnailUrl',
97
  'content' => $a['img_src'],
98
+ ),
99
  ),
100
  $a
101
  );
108
  array(
109
  'name' => 'title',
110
  'tag' => 'meta',
111
+ 'attr' => array(
112
  'itemprop' => 'name',
113
  'content' => trim( $a['title'] ),
114
+ )
115
  ),
116
  $a
117
  );
public/functions-shortcode-filters.php CHANGED
@@ -107,13 +107,7 @@ function arve_sc_filter_attr( $a ) {
107
  'height' => empty( $a['height'] ) ? false : $a['height'],
108
  );
109
 
110
- if ( 'vimeo' == $a['provider'] ) {
111
- $a['iframe_attr']['sandbox'] .= ' allow-forms';
112
- }
113
-
114
- $properties['iframe']['requires_flash'] = $options['iframe_flash'];
115
-
116
- if ( null === $a['disable_flash'] && $properties[ $a['provider'] ]['requires_flash'] ) {
117
  $a['iframe_attr']['sandbox'] = false;
118
  }
119
  }
@@ -131,7 +125,7 @@ function arve_sc_filter_validate( $a ) {
131
  $a['arve_link'] = arve_validate_bool( $a['arve_link'], 'arve_link' );
132
  $a['loop'] = arve_validate_bool( $a['loop'], 'loop' );
133
  $a['controls'] = arve_validate_bool( $a['controls'], 'controls' );
134
- $a['disable_flash'] = arve_validate_bool( $a['disable_flash'], 'disable_flash' );
135
  $a['muted'] = arve_validate_bool( $a['muted'], 'muted' );
136
  $a['playsinline'] = arve_validate_bool( $a['playsinline'], 'playsinline' );
137
 
107
  'height' => empty( $a['height'] ) ? false : $a['height'],
108
  );
109
 
110
+ if ( false === $a['sandbox'] || 'vimeo' === $a['provider'] ) {
 
 
 
 
 
 
111
  $a['iframe_attr']['sandbox'] = false;
112
  }
113
  }
125
  $a['arve_link'] = arve_validate_bool( $a['arve_link'], 'arve_link' );
126
  $a['loop'] = arve_validate_bool( $a['loop'], 'loop' );
127
  $a['controls'] = arve_validate_bool( $a['controls'], 'controls' );
128
+ $a['sandbox'] = arve_validate_bool( $a['sandbox'], 'sandbox' );
129
  $a['muted'] = arve_validate_bool( $a['muted'], 'muted' );
130
  $a['playsinline'] = arve_validate_bool( $a['playsinline'], 'playsinline' );
131
 
public/functions-shortcodes.php CHANGED
@@ -41,41 +41,41 @@ function arve_shortcode_arve( $input_atts, $content = null, $arve_shortcode = tr
41
  $input_atts = (array) $input_atts;
42
 
43
  $pairs = array(
44
- 'align' => $options['align'],
45
- 'arve_link' => arve_bool_to_shortcode_string( $options['promote_link'] ),
46
- 'aspect_ratio' => null,
47
- 'autoplay' => arve_bool_to_shortcode_string( $options['autoplay'] ),
48
- 'description' => null,
49
- 'duration' => null,
50
- 'disable_flash' => null,
51
- 'iframe_name' => null,
52
- 'maxwidth' => (string) arve_default_maxwidth(),
53
- 'mode' => $options['mode'],
54
- 'parameters' => null,
55
- 'src' => null, // Just a alias for url to make it simple
56
- 'thumbnail' => null,
57
- 'title' => null,
58
- 'upload_date' => null,
59
  // <video>
60
- 'm4v' => null,
61
- 'mp4' => null,
62
- 'ogv' => null,
63
- 'webm' => null,
64
- 'preload' => 'metadata',
65
- 'playsinline' => null,
66
- 'muted' => null,
67
- 'controls' => 'y',
68
- 'controlslist' => empty( $options['controlslist'] ) ? null : (string) $options['controlslist'],
69
- 'loop' => 'n',
70
  // TED only
71
- 'lang' => null,
72
  // Vimeo only
73
- 'start' => null,
74
  // Old Shortcodes / URL embeds
75
- 'id' => null,
76
- 'provider' => null,
77
  // deprecated, title should be used
78
- 'link_text' => null,
79
  );
80
 
81
  for ( $n = 1; $n <= ARVE_NUM_TRACKS; $n++ ) {
@@ -165,7 +165,6 @@ function arve_shortcode_arve_supported() {
165
  $out .= '<th>Provider</th>';
166
  $out .= '<th>Requires<br>embed code</th>';
167
  $out .= '<th>SSL</th>';
168
- $out .= '<th>Requires Flash</th>';
169
  $out .= '<th>Auto Thumbnail<br>(Pro Addon)</th>';
170
  $out .= '<th>Auto Title<br>(Pro Addon)</th>';
171
  $out .= '</tr>';
@@ -187,7 +186,6 @@ function arve_shortcode_arve_supported() {
187
  $out .= sprintf( '<td>%s</td>', esc_html( $values['name'] ) );
188
  $out .= sprintf( '<td>%s</td>', ( isset( $values['requires_src'] ) && $values['requires_src'] ) ? '&#x2713;' : '' );
189
  $out .= sprintf( '<td>%s</td>', ( isset( $values['embed_url'] ) && arve_starts_with( $values['embed_url'], 'https' ) ) ? '&#x2713;' : '' );
190
- $out .= sprintf( '<td>%s</td>', ! empty( $values['requires_flash'] ) ? '&#x2713;' : '' );
191
  $out .= sprintf( '<td>%s</td>', ( isset( $values['auto_thumbnail'] ) && $values['auto_thumbnail'] ) ? '&#x2713;' : '' );
192
  $out .= sprintf( '<td>%s</td>', ( isset( $values['auto_title'] ) && $values['auto_title'] ) ? '&#x2713;' : '' );
193
  $out .= '</tr>';
41
  $input_atts = (array) $input_atts;
42
 
43
  $pairs = array(
44
+ 'align' => $options['align'],
45
+ 'arve_link' => arve_bool_to_shortcode_string( $options['promote_link'] ),
46
+ 'aspect_ratio' => null,
47
+ 'autoplay' => arve_bool_to_shortcode_string( $options['autoplay'] ),
48
+ 'description' => null,
49
+ 'duration' => null,
50
+ 'sandbox' => 'y',
51
+ 'iframe_name' => null,
52
+ 'maxwidth' => (string) arve_default_maxwidth(),
53
+ 'mode' => $options['mode'],
54
+ 'parameters' => null,
55
+ 'src' => null, // Just a alias for url to make it simple
56
+ 'thumbnail' => null,
57
+ 'title' => null,
58
+ 'upload_date' => null,
59
  // <video>
60
+ 'm4v' => null,
61
+ 'mp4' => null,
62
+ 'ogv' => null,
63
+ 'webm' => null,
64
+ 'preload' => 'metadata',
65
+ 'playsinline' => null,
66
+ 'muted' => null,
67
+ 'controls' => 'y',
68
+ 'controlslist' => empty( $options['controlslist'] ) ? null : (string) $options['controlslist'],
69
+ 'loop' => 'n',
70
  // TED only
71
+ 'lang' => null,
72
  // Vimeo only
73
+ 'start' => null,
74
  // Old Shortcodes / URL embeds
75
+ 'id' => null,
76
+ 'provider' => null,
77
  // deprecated, title should be used
78
+ 'link_text' => null,
79
  );
80
 
81
  for ( $n = 1; $n <= ARVE_NUM_TRACKS; $n++ ) {
165
  $out .= '<th>Provider</th>';
166
  $out .= '<th>Requires<br>embed code</th>';
167
  $out .= '<th>SSL</th>';
 
168
  $out .= '<th>Auto Thumbnail<br>(Pro Addon)</th>';
169
  $out .= '<th>Auto Title<br>(Pro Addon)</th>';
170
  $out .= '</tr>';
186
  $out .= sprintf( '<td>%s</td>', esc_html( $values['name'] ) );
187
  $out .= sprintf( '<td>%s</td>', ( isset( $values['requires_src'] ) && $values['requires_src'] ) ? '&#x2713;' : '' );
188
  $out .= sprintf( '<td>%s</td>', ( isset( $values['embed_url'] ) && arve_starts_with( $values['embed_url'], 'https' ) ) ? '&#x2713;' : '' );
 
189
  $out .= sprintf( '<td>%s</td>', ( isset( $values['auto_thumbnail'] ) && $values['auto_thumbnail'] ) ? '&#x2713;' : '' );
190
  $out .= sprintf( '<td>%s</td>', ( isset( $values['auto_title'] ) && $values['auto_title'] ) ? '&#x2713;' : '' );
191
  $out .= '</tr>';
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: nico23
3
  Donate link: https://www.paypal.me/nico23
4
  Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embedder, iframe, lightweight, simplicity, shortcodes
5
  Requires at least: 4.4.0
6
- Tested up to: 4.9.4
7
  Requires PHP: 5.3
8
- Stable tag: 8.10.3
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -158,7 +158,7 @@ This plugins embed is considered as 'custom player' by YouTube so you have to pa
158
  * [ARVE Pro addon changelog](https://nextgenthemes.com/plugins/arve-pro/changelog/)
159
  * [ARVE AMP addon changelog](https://nextgenthemes.com/plugins/arve-amp/)
160
 
161
- ### 2019-01-17 - 8.10.3 ###
162
 
163
  * Fix: PHP compatibility lowered to offical 5.3 as there was accidentally 5.4+ code used. Make sure you are on PHP 7.3 or at least 5.6 for the upcoming future as WP itself will require 5.6 this year. Its also insecure to run on those outdated versions: https://secure.php.net/supported-versions.php.
164
 
3
  Donate link: https://www.paypal.me/nico23
4
  Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embedder, iframe, lightweight, simplicity, shortcodes
5
  Requires at least: 4.4.0
6
+ Tested up to: 5.2.0
7
  Requires PHP: 5.3
8
+ Stable tag: 8.10.4
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
158
  * [ARVE Pro addon changelog](https://nextgenthemes.com/plugins/arve-pro/changelog/)
159
  * [ARVE AMP addon changelog](https://nextgenthemes.com/plugins/arve-amp/)
160
 
161
+ ### 2019-01-23 - 8.10.4 ###
162
 
163
  * Fix: PHP compatibility lowered to offical 5.3 as there was accidentally 5.4+ code used. Make sure you are on PHP 7.3 or at least 5.6 for the upcoming future as WP itself will require 5.6 this year. Its also insecure to run on those outdated versions: https://secure.php.net/supported-versions.php.
164
 
shared/functions-shared.php CHANGED
@@ -15,7 +15,6 @@ function arve_get_options_defaults( $section ) {
15
  'wp_video_override' => true,
16
  'controlslist' => 'nodownload',
17
  'vimeo_api_token' => '',
18
- 'iframe_flash' => true,
19
  'youtube_nocookie' => true,
20
  );
21
 
@@ -345,20 +344,6 @@ function arve_get_settings_definitions() {
345
  ),
346
  'description' => esc_html__( 'Mute HTML5 video.', ARVE_SLUG ),
347
  ),
348
- array(
349
- 'hide_from_sc' => true,
350
- 'attr' => 'iframe_flash',
351
- 'label' => esc_html__( 'Allow Flash for general iframe?', ARVE_SLUG ),
352
- 'type' => 'select',
353
- 'options' => array(
354
- 'yes' => esc_html__( 'Allow Flash', ARVE_SLUG ),
355
- 'no' => esc_html__( 'Do not allow Flash', ARVE_SLUG ),
356
- ),
357
- 'description' => sprintf(
358
- __( 'It is recommented to have this disabled if you not embed videos from a <a href="%s">not listed provider</a> that still requires flash and is not listed here. Disable flash will make general iframe embeds more secure, prevents evil redirection from within the iframe. This also makes the Pro Addon\'s \'Disable Links\' feature possible for unlisted providers. Note you can still put <code>disable_flash="yes/no"</code> on individual shortcodes to overwrite this if needed.', ARVE_SLUG ),
359
- 'https://nextgenthemes.com/plugins/arve-pro/#support-table'
360
- ),
361
- ),
362
  array(
363
  'hide_from_sc' => true,
364
  'attr' => 'always_enqueue_assets',
@@ -484,7 +469,6 @@ function arve_get_host_properties() {
484
  'embed_url' => 'http://break.com/embed/%s',
485
  'default_params' => 'embed=1',
486
  'auto_thumbnail' => false,
487
- 'requires_flash' => true,
488
  'tests' => array(
489
  array(
490
  'url' => 'http://www.break.com/video/first-person-pov-of-tornado-strike-2542591-test',
@@ -840,7 +824,6 @@ function arve_get_host_properties() {
840
  'name' => 'RuTube.ru',
841
  'regex' => $s . 'rutube\.ru/play/embed/(?<id>[0-9]+)',
842
  'embed_url' => 'https://rutube.ru/play/embed/%s',
843
- 'requires_flash' => true,
844
  'tests' => array(
845
  array(
846
  'url' => 'https://rutube.ru/play/embed/9822149',
@@ -866,7 +849,6 @@ function arve_get_host_properties() {
866
  'embed_url' => 'https://scache.vevo.com/assets/html/embed.html?video=%s',
867
  'default_params' => 'playlist=false&playerType=embedded&env=0',
868
  'auto_thumbnail' => false,
869
- 'requires_flash' => true,
870
  'tests' => array(
871
  array(
872
  'url' => 'https://www.vevo.com/watch/the-offspring/the-kids-arent-alright/USSM20100649',
@@ -896,7 +878,6 @@ function arve_get_host_properties() {
896
  'name' => 'vidspot.net',
897
  'regex' => $s . 'vidspot\.net/(embed-)?(?<id>[a-z0-9]+)',
898
  'embed_url' => 'http://vidspot.net/embed-%s.html',
899
- 'requires_flash' => true,
900
  'tests' => array(
901
  array( 'url' => 'http://vidspot.net/285wf9uk3rry', 'id' => '285wf9uk3rry' ),
902
  array( 'url' => 'http://vidspot.net/embed-285wf9uk3rry.html', 'id' => '285wf9uk3rry' ),
@@ -977,7 +958,6 @@ function arve_get_host_properties() {
977
  'regex' => $s . 'xtube\.com/watch\.php\?v=(?<id>[a-z0-9_\-]+)',
978
  'embed_url' => 'http://www.xtube.com/embedded/user/play.php?v=%s',
979
  'auto_thumbnail' => false,
980
- 'requires_flash' => true,
981
  'tests' => array(
982
  array( 'url' => 'http://www.xtube.com/watch.php?v=1234', 'id' => 1234 ),
983
  ),
@@ -988,7 +968,6 @@ function arve_get_host_properties() {
988
  'default_params' => 'format=embed',
989
  'auto_thumbnail' => true,
990
  'auto_title' => true,
991
- 'requires_flash' => true,
992
  'tests' => array(
993
  array(
994
  'url' => 'https://de.sports.yahoo.com/video/krasse-vorher-nachher-bilder-mann-094957265.html?format=embed&player_autoplay=false',
@@ -1005,7 +984,6 @@ function arve_get_host_properties() {
1005
  'embed_url' => 'http://player.youku.com/embed/%s',
1006
  'auto_thumbnail' => false,
1007
  'aspect_ratio' => '450:292.5',
1008
- 'requires_flash' => true,
1009
  # <iframe height=498 width=510 src="http://player.youku.com/embed/XMTUyODYwOTc4OA==" frameborder=0 allowfullscreen></iframe>
1010
  'tests' => array(
1011
  array(
@@ -1240,7 +1218,6 @@ function arve_get_host_properties() {
1240
  'embed_url' => '%s',
1241
  'default_params' => '',
1242
  'auto_thumbnail' => false,
1243
- 'requires_flash' => true,
1244
  'tests' => array(
1245
  array( 'url' => 'https://example.com/', 'id' => 'https://example.com/' ),
1246
  ),
@@ -1258,9 +1235,6 @@ function arve_get_host_properties() {
1258
  if( ! isset( $value['aspect_ratio'] ) ) {
1259
  $properties[ $key ]['aspect_ratio'] = '16:9';
1260
  }
1261
- if( empty( $value['requires_flash'] ) ) {
1262
- $properties[ $key ]['requires_flash'] = false;
1263
- }
1264
  }
1265
 
1266
  return $properties;
15
  'wp_video_override' => true,
16
  'controlslist' => 'nodownload',
17
  'vimeo_api_token' => '',
 
18
  'youtube_nocookie' => true,
19
  );
20
 
344
  ),
345
  'description' => esc_html__( 'Mute HTML5 video.', ARVE_SLUG ),
346
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  array(
348
  'hide_from_sc' => true,
349
  'attr' => 'always_enqueue_assets',
469
  'embed_url' => 'http://break.com/embed/%s',
470
  'default_params' => 'embed=1',
471
  'auto_thumbnail' => false,
 
472
  'tests' => array(
473
  array(
474
  'url' => 'http://www.break.com/video/first-person-pov-of-tornado-strike-2542591-test',
824
  'name' => 'RuTube.ru',
825
  'regex' => $s . 'rutube\.ru/play/embed/(?<id>[0-9]+)',
826
  'embed_url' => 'https://rutube.ru/play/embed/%s',
 
827
  'tests' => array(
828
  array(
829
  'url' => 'https://rutube.ru/play/embed/9822149',
849
  'embed_url' => 'https://scache.vevo.com/assets/html/embed.html?video=%s',
850
  'default_params' => 'playlist=false&playerType=embedded&env=0',
851
  'auto_thumbnail' => false,
 
852
  'tests' => array(
853
  array(
854
  'url' => 'https://www.vevo.com/watch/the-offspring/the-kids-arent-alright/USSM20100649',
878
  'name' => 'vidspot.net',
879
  'regex' => $s . 'vidspot\.net/(embed-)?(?<id>[a-z0-9]+)',
880
  'embed_url' => 'http://vidspot.net/embed-%s.html',
 
881
  'tests' => array(
882
  array( 'url' => 'http://vidspot.net/285wf9uk3rry', 'id' => '285wf9uk3rry' ),
883
  array( 'url' => 'http://vidspot.net/embed-285wf9uk3rry.html', 'id' => '285wf9uk3rry' ),
958
  'regex' => $s . 'xtube\.com/watch\.php\?v=(?<id>[a-z0-9_\-]+)',
959
  'embed_url' => 'http://www.xtube.com/embedded/user/play.php?v=%s',
960
  'auto_thumbnail' => false,
 
961
  'tests' => array(
962
  array( 'url' => 'http://www.xtube.com/watch.php?v=1234', 'id' => 1234 ),
963
  ),
968
  'default_params' => 'format=embed',
969
  'auto_thumbnail' => true,
970
  'auto_title' => true,
 
971
  'tests' => array(
972
  array(
973
  'url' => 'https://de.sports.yahoo.com/video/krasse-vorher-nachher-bilder-mann-094957265.html?format=embed&player_autoplay=false',
984
  'embed_url' => 'http://player.youku.com/embed/%s',
985
  'auto_thumbnail' => false,
986
  'aspect_ratio' => '450:292.5',
 
987
  # <iframe height=498 width=510 src="http://player.youku.com/embed/XMTUyODYwOTc4OA==" frameborder=0 allowfullscreen></iframe>
988
  'tests' => array(
989
  array(
1218
  'embed_url' => '%s',
1219
  'default_params' => '',
1220
  'auto_thumbnail' => false,
 
1221
  'tests' => array(
1222
  array( 'url' => 'https://example.com/', 'id' => 'https://example.com/' ),
1223
  ),
1235
  if( ! isset( $value['aspect_ratio'] ) ) {
1236
  $properties[ $key ]['aspect_ratio'] = '16:9';
1237
  }
 
 
 
1238
  }
1239
 
1240
  return $properties;