Version Description
Download this release
Release Info
Developer | nico23 |
Plugin | ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) |
Version | 9.7.0 |
Comparing to | |
See all releases |
Code changes from version 9.6.2 to 9.7.0
- advanced-responsive-video-embedder.php +2 -2
- changelog.md +5 -0
- php/functions-html-output.php +44 -74
- php/init.php +1 -1
- readme.txt +15 -3
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: 9.
|
7 |
* Author: Nicolas Jonas
|
8 |
* Author URI: https://nextgenthemes.com
|
9 |
* License: GPL-3.0
|
@@ -19,7 +19,7 @@
|
|
19 |
|
20 |
namespace Nextgenthemes\ARVE;
|
21 |
|
22 |
-
const VERSION = '9.
|
23 |
const PRO_VERSION_REQUIRED = '5.2.0';
|
24 |
const NUM_TRACKS = 3;
|
25 |
const PLUGIN_FILE = __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: 9.7.0
|
7 |
* Author: Nicolas Jonas
|
8 |
* Author URI: https://nextgenthemes.com
|
9 |
* License: GPL-3.0
|
19 |
|
20 |
namespace Nextgenthemes\ARVE;
|
21 |
|
22 |
+
const VERSION = '9.7.0';
|
23 |
const PRO_VERSION_REQUIRED = '5.2.0';
|
24 |
const NUM_TRACKS = 3;
|
25 |
const PLUGIN_FILE = __FILE__;
|
changelog.md
CHANGED
@@ -4,6 +4,11 @@
|
|
4 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
5 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
|
6 |
|
|
|
|
|
|
|
|
|
|
|
7 |
### 2021-12-07 9.6.0 ###
|
8 |
|
9 |
* Preprecated: Shortcode UI dialog is no longer maintained but you can still use it by clicking on "Add Post Element" button when Shortcode UI is installed.
|
4 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
5 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
|
6 |
|
7 |
+
### 2021-12-09 9.7.0 ###
|
8 |
+
|
9 |
+
* Fix: Partially reverse `preload="none"` on `<video>`. This causes thumbnails not to be generated from the video by the browser. `preload="none"` will be used only for Lazyload and Lightbox mode when there is a thumbnail image.
|
10 |
+
* Improved: Seo data is now generated in `json-ld`.
|
11 |
+
|
12 |
### 2021-12-07 9.6.0 ###
|
13 |
|
14 |
* Preprecated: Shortcode UI dialog is no longer maintained but you can still use it by clicking on "Add Post Element" button when Shortcode UI is installed.
|
php/functions-html-output.php
CHANGED
@@ -22,7 +22,7 @@ function build_html( array $a ) {
|
|
22 |
array(
|
23 |
'name' => 'arve',
|
24 |
'tag' => 'div',
|
25 |
-
'inner_html' => $wrapped_video . promote_link( $a['arve_link'] ),
|
26 |
'attr' => array(
|
27 |
'class' => $a['align'] ? 'arve align' . $a['align'] : 'arve',
|
28 |
'data-mode' => $a['mode'],
|
@@ -30,10 +30,6 @@ function build_html( array $a ) {
|
|
30 |
'data-provider' => $a['provider'],
|
31 |
'id' => $a['uid'],
|
32 |
'style' => $a['maxwidth'] ? sprintf( 'max-width:%dpx;', $a['maxwidth'] ) : false,
|
33 |
-
|
34 |
-
// Schema.org
|
35 |
-
'itemscope' => $options['seo_data'] ? '' : false,
|
36 |
-
'itemtype' => $options['seo_data'] ? 'http://schema.org/VideoObject' : false,
|
37 |
),
|
38 |
),
|
39 |
$a
|
@@ -92,6 +88,11 @@ function build_iframe_tag( array $a ) {
|
|
92 |
function build_video_tag( array $a ) {
|
93 |
|
94 |
$autoplay = in_array( $a['mode'], array( 'lazyload', 'lightbox', 'link-lightbox' ), true ) ? false : $a['autoplay'];
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
return build_tag(
|
97 |
array(
|
@@ -104,7 +105,7 @@ function build_video_tag( array $a ) {
|
|
104 |
'controls' => $a['controls'],
|
105 |
'controlslist' => $a['controlslist'],
|
106 |
'loop' => $a['loop'],
|
107 |
-
'preload' =>
|
108 |
'width' => is_feed() ? $a['width'] : false,
|
109 |
'poster' => empty( $a['img_src'] ) ? false : $a['img_src'],
|
110 |
// ARVE only
|
@@ -221,31 +222,7 @@ function get_debug_info( $input_html, array $a, array $input_atts ) {
|
|
221 |
|
222 |
function arve_embed_inner_html( array $a ) {
|
223 |
|
224 |
-
$html
|
225 |
-
$options = options();
|
226 |
-
|
227 |
-
if ( $options['seo_data'] ) :
|
228 |
-
|
229 |
-
$metas = array(
|
230 |
-
'first_video_file' => 'contentURL',
|
231 |
-
'src' => 'embedURL',
|
232 |
-
'upload_date' => 'uploadDate',
|
233 |
-
'author_name' => 'author',
|
234 |
-
'duration' => 'duration',
|
235 |
-
);
|
236 |
-
|
237 |
-
foreach ( $metas as $key => $itemprop ) {
|
238 |
-
|
239 |
-
if ( ! empty( $a[ $key ] ) ) {
|
240 |
-
if ( 'duration' === $key && \is_numeric( $a[ $key ] ) ) {
|
241 |
-
$a[ $key ] = seconds_to_iso8601_duration( $a[ $key ] );
|
242 |
-
}
|
243 |
-
$html .= sprintf( '<meta itemprop="%s" content="%s">' . PHP_EOL, esc_attr( $itemprop ), esc_attr( $a[ $key ] ) );
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
$html .= build_rating_meta( $a );
|
248 |
-
endif;
|
249 |
|
250 |
if ( 'html5' === $a['provider'] ) {
|
251 |
$html .= build_video_tag( $a );
|
@@ -254,63 +231,56 @@ function arve_embed_inner_html( array $a ) {
|
|
254 |
}
|
255 |
|
256 |
if ( ! empty( $a['img_src'] ) ) {
|
257 |
-
|
258 |
-
$tag = array( 'name' => 'thumbnail' );
|
259 |
-
|
260 |
-
if ( $options['seo_data'] ) {
|
261 |
-
|
262 |
-
$tag = array(
|
263 |
-
'name' => 'thumbnail',
|
264 |
-
'tag' => 'meta',
|
265 |
-
'attr' => array(
|
266 |
-
'itemprop' => 'thumbnailUrl',
|
267 |
-
'content' => $a['img_src'],
|
268 |
-
),
|
269 |
-
);
|
270 |
-
}
|
271 |
-
|
272 |
$html .= build_tag( $tag, $a );
|
273 |
}
|
274 |
|
275 |
if ( $a['title'] ) {
|
|
|
|
|
|
|
276 |
|
277 |
-
|
278 |
|
279 |
-
|
280 |
-
|
281 |
-
'name' => 'title',
|
282 |
-
'tag' => 'meta',
|
283 |
-
'attr' => array(
|
284 |
-
'itemprop' => 'name',
|
285 |
-
'content' => trim( $a['title'] ),
|
286 |
-
),
|
287 |
-
);
|
288 |
-
}
|
289 |
|
290 |
-
|
|
|
|
|
|
|
|
|
|
|
291 |
}
|
292 |
|
293 |
-
|
|
|
|
|
|
|
|
|
294 |
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
|
297 |
-
|
298 |
-
$tag = array(
|
299 |
-
'name' => 'description',
|
300 |
-
'tag' => 'meta',
|
301 |
-
'attr' => array(
|
302 |
-
'itemprop' => 'description',
|
303 |
-
'content' => trim( $a['description'] ),
|
304 |
-
),
|
305 |
-
);
|
306 |
-
}
|
307 |
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
|
311 |
-
|
312 |
-
|
313 |
-
return $html;
|
314 |
}
|
315 |
|
316 |
function build_rating_meta( array $a ) {
|
22 |
array(
|
23 |
'name' => 'arve',
|
24 |
'tag' => 'div',
|
25 |
+
'inner_html' => $wrapped_video . promote_link( $a['arve_link'] ) . build_seo_data( $a ),
|
26 |
'attr' => array(
|
27 |
'class' => $a['align'] ? 'arve align' . $a['align'] : 'arve',
|
28 |
'data-mode' => $a['mode'],
|
30 |
'data-provider' => $a['provider'],
|
31 |
'id' => $a['uid'],
|
32 |
'style' => $a['maxwidth'] ? sprintf( 'max-width:%dpx;', $a['maxwidth'] ) : false,
|
|
|
|
|
|
|
|
|
33 |
),
|
34 |
),
|
35 |
$a
|
88 |
function build_video_tag( array $a ) {
|
89 |
|
90 |
$autoplay = in_array( $a['mode'], array( 'lazyload', 'lightbox', 'link-lightbox' ), true ) ? false : $a['autoplay'];
|
91 |
+
$preload = 'metadata';
|
92 |
+
|
93 |
+
if ( in_array( $a['mode'], [ 'lazyload', 'lightbox' ], true ) && ! empty( $a['img_src'] ) ) {
|
94 |
+
$preload = 'none';
|
95 |
+
}
|
96 |
|
97 |
return build_tag(
|
98 |
array(
|
105 |
'controls' => $a['controls'],
|
106 |
'controlslist' => $a['controlslist'],
|
107 |
'loop' => $a['loop'],
|
108 |
+
'preload' => $preload,
|
109 |
'width' => is_feed() ? $a['width'] : false,
|
110 |
'poster' => empty( $a['img_src'] ) ? false : $a['img_src'],
|
111 |
// ARVE only
|
222 |
|
223 |
function arve_embed_inner_html( array $a ) {
|
224 |
|
225 |
+
$html = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
if ( 'html5' === $a['provider'] ) {
|
228 |
$html .= build_video_tag( $a );
|
231 |
}
|
232 |
|
233 |
if ( ! empty( $a['img_src'] ) ) {
|
234 |
+
$tag = array( 'name' => 'thumbnail' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
$html .= build_tag( $tag, $a );
|
236 |
}
|
237 |
|
238 |
if ( $a['title'] ) {
|
239 |
+
$tag = array( 'name' => 'title' );
|
240 |
+
$html .= build_tag( $tag, $a );
|
241 |
+
}
|
242 |
|
243 |
+
$html .= build_tag( array( 'name' => 'button' ), $a );
|
244 |
|
245 |
+
return $html;
|
246 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
+
function build_seo_data( array $a ) {
|
249 |
+
|
250 |
+
$options = options();
|
251 |
+
|
252 |
+
if ( ! $options['seo_data'] ) {
|
253 |
+
return '';
|
254 |
}
|
255 |
|
256 |
+
$payload = array(
|
257 |
+
'@context' => 'http://schema.org/',
|
258 |
+
'@id' => get_permalink() . '#' . $a['uid'],
|
259 |
+
'type' => 'VideoObject',
|
260 |
+
);
|
261 |
|
262 |
+
$metas = array(
|
263 |
+
'first_video_file' => 'contentURL',
|
264 |
+
'src' => 'embedURL',
|
265 |
+
'title' => 'name',
|
266 |
+
'img_src' => 'thumbnailUrl',
|
267 |
+
'upload_date' => 'uploadDate',
|
268 |
+
'author_name' => 'author',
|
269 |
+
'duration' => 'duration',
|
270 |
+
'description' => 'description',
|
271 |
+
);
|
272 |
|
273 |
+
foreach ( $metas as $key => $val ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
|
275 |
+
if ( ! empty( $a[ $key ] ) ) {
|
276 |
+
if ( 'duration' === $key && \is_numeric( $a[ $key ] ) ) {
|
277 |
+
$a[ $key ] = seconds_to_iso8601_duration( $a[ $key ] );
|
278 |
+
}
|
279 |
+
$payload[ $val ] = trim( $a[ $key ] );
|
280 |
+
}
|
281 |
}
|
282 |
|
283 |
+
return '<script type="application/ld+json">' . wp_json_encode($payload) . '</script>';
|
|
|
|
|
284 |
}
|
285 |
|
286 |
function build_rating_meta( array $a ) {
|
php/init.php
CHANGED
@@ -16,7 +16,7 @@ function init_public() {
|
|
16 |
$GLOBALS['wpdb']->query( "DELETE FROM {$GLOBALS['wpdb']->postmeta} WHERE meta_key LIKE '%_oembed_%'" );
|
17 |
}
|
18 |
|
19 |
-
if ( version_compare( get_option( 'arve_version' ), '9.5.
|
20 |
$GLOBALS['wpdb']->query( "DELETE FROM {$GLOBALS['wpdb']->postmeta} WHERE meta_key LIKE '%_oembed_%' AND meta_value LIKE '%vimeocdn%'" );
|
21 |
}
|
22 |
|
16 |
$GLOBALS['wpdb']->query( "DELETE FROM {$GLOBALS['wpdb']->postmeta} WHERE meta_key LIKE '%_oembed_%'" );
|
17 |
}
|
18 |
|
19 |
+
if ( version_compare( get_option( 'arve_version' ), '9.5.14', '<' ) ) {
|
20 |
$GLOBALS['wpdb']->query( "DELETE FROM {$GLOBALS['wpdb']->postmeta} WHERE meta_key LIKE '%_oembed_%' AND meta_value LIKE '%vimeocdn%'" );
|
21 |
}
|
22 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embe
|
|
5 |
Requires at least: 4.9.16
|
6 |
Tested up to: 5.9.0
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 9.
|
9 |
License: GPL-3.0
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -23,10 +23,9 @@ It is very likely the one and only plugin you will ever need to handle video emb
|
|
23 |
|
24 |
#### Classic Editor ####
|
25 |
|
|
|
26 |
* Takes over WordPress embeds with URLs on their own line and `[embed]` shortcodes.
|
27 |
* Can take over WP's default video file embeds.
|
28 |
-
* Has its own very powerful `[arve]` shortcode.
|
29 |
-
* Optional <abbr title="What You See Is What You Get">WYSIWYG</abbr> support with [Shortcode UI](https://wordpress.org/plugins/shortcode-ui/) (not maintained). No more messing around with shortcodes and previewing.
|
30 |
|
31 |
#### Gutenberg ####
|
32 |
|
@@ -151,6 +150,14 @@ When you use the AMP or 'AMP for WP' plugin you need this.
|
|
151 |
|
152 |
Please report it on [nextgenthemes.com/support/](https://nextgenthemes.com/support/) **and please do not on the wordpess.org forums, thanks.**
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
### How to get the pro version working? ###
|
155 |
|
156 |
1. Go though the purchase process on [nextgenthemes.com](https://nextgenthemes.com/plugins/arve-pro/)
|
@@ -193,6 +200,11 @@ Please read the [official documentation](https://wordpress.org/support/article/m
|
|
193 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
194 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
|
195 |
|
|
|
|
|
|
|
|
|
|
|
196 |
### 2021-12-07 9.6.0 ###
|
197 |
|
198 |
* Preprecated: Shortcode UI dialog is no longer maintained but you can still use it by clicking on "Add Post Element" button when Shortcode UI is installed.
|
5 |
Requires at least: 4.9.16
|
6 |
Tested up to: 5.9.0
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 9.7.0
|
9 |
License: GPL-3.0
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
23 |
|
24 |
#### Classic Editor ####
|
25 |
|
26 |
+
* Adds "Embed Video" button to help you create very powerful `[arve]` shortcodes.
|
27 |
* Takes over WordPress embeds with URLs on their own line and `[embed]` shortcodes.
|
28 |
* Can take over WP's default video file embeds.
|
|
|
|
|
29 |
|
30 |
#### Gutenberg ####
|
31 |
|
150 |
|
151 |
Please report it on [nextgenthemes.com/support/](https://nextgenthemes.com/support/) **and please do not on the wordpess.org forums, thanks.**
|
152 |
|
153 |
+
### Google structured data tool complains about data missing ###
|
154 |
+
|
155 |
+
You have 3 options:
|
156 |
+
|
157 |
+
1. Best option is to get [ARVE Pro](https://nextgenthemes.com/plugins/arve-pro/). It will fill all the SEO data needed without you having to do anything.
|
158 |
+
1. Manually fill the data needed via shortcode or Block. Note that filling the title will fill `name` in the SEO data.
|
159 |
+
1. You can completely disable the generation of SEO data on the ARVE settings page. This will make the error on SEO tools disappear but will not give you any SEO benefits.
|
160 |
+
|
161 |
### How to get the pro version working? ###
|
162 |
|
163 |
1. Go though the purchase process on [nextgenthemes.com](https://nextgenthemes.com/plugins/arve-pro/)
|
200 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
201 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
|
202 |
|
203 |
+
### 2021-12-09 9.7.0 ###
|
204 |
+
|
205 |
+
* Fix: Partially reverse `preload="none"` on `<video>`. This causes thumbnails not to be generated from the video by the browser. `preload="none"` will be used only for Lazyload and Lightbox mode when there is a thumbnail image.
|
206 |
+
* Improved: Seo data is now generated in `json-ld`.
|
207 |
+
|
208 |
### 2021-12-07 9.6.0 ###
|
209 |
|
210 |
* Preprecated: Shortcode UI dialog is no longer maintained but you can still use it by clicking on "Add Post Element" button when Shortcode UI is installed.
|