Version Description
Download this release
Release Info
Developer | nico23 |
Plugin | ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) |
Version | 8.10.0 |
Comparing to | |
See all releases |
Code changes from version 8.9.11 to 8.10.0
- advanced-responsive-video-embedder.php +2 -2
- public/functions-html-output.php +38 -53
- public/functions-shortcodes.php +12 -1
- readme.txt +6 -1
- shared/functions-shared.php +2 -2
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.
|
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.
|
23 |
define( 'ARVE_PRO_VERSION_REQUIRED', '4.0.0' );
|
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.0
|
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.0' );
|
23 |
define( 'ARVE_PRO_VERSION_REQUIRED', '4.0.0' );
|
24 |
|
25 |
define( 'ARVE_URL', plugin_dir_url( __FILE__ ) );
|
public/functions-html-output.php
CHANGED
@@ -63,70 +63,55 @@ function arve_get_debug_info( $input_html, $atts, $input_atts ) {
|
|
63 |
|
64 |
function arve_build_meta_html( $atts ) {
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
-
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
|
87 |
-
|
88 |
-
|
89 |
-
if( in_array( $atts['mode'], array( 'lazyload', 'lazyload-lightbox' ) ) ) {
|
90 |
-
|
91 |
-
$meta .= sprintf(
|
92 |
-
'<img%s>',
|
93 |
-
arve_attr( array(
|
94 |
-
'class' => 'arve-thumbnail',
|
95 |
-
'data-object-fit' => true,
|
96 |
-
'itemprop' => 'thumbnailUrl',
|
97 |
-
'src' => $atts['img_src'],
|
98 |
-
'srcset' => ! empty( $atts['img_srcset'] ) ? $atts['img_srcset'] : false,
|
99 |
-
#'sizes' => '(max-width: 700px) 100vw, 1280px',
|
100 |
-
'alt' => __( 'Video Thumbnail', ARVE_SLUG ),
|
101 |
-
) )
|
102 |
-
);
|
103 |
-
|
104 |
-
} else {
|
105 |
-
|
106 |
-
$meta .= sprintf(
|
107 |
-
'<meta%s>',
|
108 |
-
arve_attr( array(
|
109 |
-
'itemprop' => 'thumbnailUrl',
|
110 |
-
'content' => $atts['img_src'],
|
111 |
-
) )
|
112 |
-
);
|
113 |
-
}
|
114 |
-
|
115 |
-
endif;
|
116 |
-
|
117 |
-
if ( ! empty( $atts['title'] ) && in_array( $atts['mode'], array( 'lazyload', 'lazyload-lightbox' ) ) && empty( $atts['hide_title'] ) ) {
|
118 |
-
$meta .= '<h5 itemprop="name" class="arve-title">' . trim( $atts['title'] ) . '</h5>';
|
119 |
-
} elseif( ! empty( $atts['title'] ) ) {
|
120 |
-
$meta .= sprintf( '<meta itemprop="name" content="%s">', esc_attr( trim( $atts['title'] ) ) );
|
121 |
-
}
|
122 |
|
123 |
-
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
function arve_build_promote_link_html( $arve_link ) {
|
131 |
|
132 |
if ( $arve_link ) {
|
63 |
|
64 |
function arve_build_meta_html( $atts ) {
|
65 |
|
66 |
+
$meta = '';
|
67 |
|
68 |
+
if ( ! empty( $atts['sources'] ) ) {
|
69 |
|
70 |
+
$first_source = arve_get_first_array_value( $atts['sources'] );
|
71 |
|
72 |
+
$meta .= sprintf( '<meta itemprop="contentURL" content="%s">', esc_attr( $first_source['src'] ) );
|
73 |
+
}
|
74 |
|
75 |
+
if ( ! empty( $atts['iframe_src'] ) ) {
|
76 |
+
$meta .= sprintf( '<meta itemprop="embedURL" content="%s">', esc_attr( $atts['iframe_src'] ) );
|
77 |
+
}
|
78 |
|
79 |
+
if ( ! empty( $atts['upload_date'] ) ) {
|
80 |
+
$meta .= sprintf( '<meta itemprop="uploadDate" content="%s">', esc_attr( $atts['upload_date'] ) );
|
81 |
+
}
|
82 |
|
83 |
+
if ( ! empty( $atts['duration'] ) ) {
|
84 |
+
$meta .= sprintf( '<meta itemprop="duration" content="PT%s">', esc_attr( $atts['duration'] ) );
|
85 |
+
}
|
86 |
|
87 |
+
if( ! empty( $atts['img_src'] ) ) :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
$meta .= sprintf(
|
90 |
+
'<meta%s>',
|
91 |
+
arve_attr( array(
|
92 |
+
'itemprop' => 'thumbnailUrl',
|
93 |
+
'content' => $atts['img_src'],
|
94 |
+
) )
|
95 |
+
);
|
96 |
+
|
97 |
+
endif;
|
98 |
|
99 |
+
if ( ! empty( $atts['title'] )
|
100 |
+
&& in_array( $atts['mode'], array( 'lazyload', 'lazyload-lightbox' ) )
|
101 |
+
&& empty( $atts['hide_title'] )
|
102 |
+
) {
|
103 |
+
$meta .= '<h5 itemprop="name" class="arve-title">' . trim( $atts['title'] ) . '</h5>';
|
104 |
+
} elseif( ! empty( $atts['title'] ) ) {
|
105 |
+
$meta .= sprintf( '<meta itemprop="name" content="%s">', esc_attr( trim( $atts['title'] ) ) );
|
106 |
}
|
107 |
|
108 |
+
if ( ! empty( $atts['description'] ) ) {
|
109 |
+
$meta .= '<span itemprop="description" class="arve-description arve-hidden">' . esc_html( trim( $atts['description'] ) ) . '</span>';
|
110 |
+
}
|
111 |
+
|
112 |
+
return $meta;
|
113 |
+
}
|
114 |
+
|
115 |
function arve_build_promote_link_html( $arve_link ) {
|
116 |
|
117 |
if ( $arve_link ) {
|
public/functions-shortcodes.php
CHANGED
@@ -22,6 +22,17 @@ function arve_shortcode( $input_atts, $content = null ) {
|
|
22 |
return arve_shortcode_arve( $input_atts, $content );
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
function arve_shortcode_arve( $input_atts, $content = null, $arve_shortcode = true ) {
|
26 |
|
27 |
$errors = '';
|
@@ -38,7 +49,7 @@ function arve_shortcode_arve( $input_atts, $content = null, $arve_shortcode = tr
|
|
38 |
'duration' => null,
|
39 |
'disable_flash' => null,
|
40 |
'iframe_name' => null,
|
41 |
-
'maxwidth' => (string)
|
42 |
'mode' => $options['mode'],
|
43 |
'parameters' => null,
|
44 |
'src' => null, // Just a alias for url to make it simple
|
22 |
return arve_shortcode_arve( $input_atts, $content );
|
23 |
}
|
24 |
|
25 |
+
function arve_default_maxwidth() {
|
26 |
+
|
27 |
+
$options = arve_get_options();
|
28 |
+
|
29 |
+
if ( empty( $options['video_maxwidth'] ) ) {
|
30 |
+
return empty( $GLOBALS['content_width'] ) ? 900 : $GLOBALS['content_width'];
|
31 |
+
}
|
32 |
+
|
33 |
+
return $options['video_maxwidth'];
|
34 |
+
}
|
35 |
+
|
36 |
function arve_shortcode_arve( $input_atts, $content = null, $arve_shortcode = true ) {
|
37 |
|
38 |
$errors = '';
|
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
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embe
|
|
5 |
Requires at least: 4.4.0
|
6 |
Tested up to: 4.9.4
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 8.
|
9 |
License: GPL-3.0
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -158,6 +158,11 @@ 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 |
### 2018-11-16 - 8.9.11 ###
|
162 |
|
163 |
* Fix: Wistia autoplay (mobile browsers sill prevent it, also effects single click lazyload in Pro)
|
5 |
Requires at least: 4.4.0
|
6 |
Tested up to: 4.9.4
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 8.10.0
|
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 |
+
### 2018-11-27 - 8.10.0 ###
|
162 |
+
|
163 |
+
* Improved: Video max width setting now defaults (if empty) to your themes `$content_width` variable to optimize thumbnail loading in Pro Addon.
|
164 |
+
* Improved: Removed code what should be in the Pro Addon instead. Make sure to update the Pro Addon as well!
|
165 |
+
|
166 |
### 2018-11-16 - 8.9.11 ###
|
167 |
|
168 |
* Fix: Wistia autoplay (mobile browsers sill prevent it, also effects single click lazyload in Pro)
|
shared/functions-shared.php
CHANGED
@@ -9,7 +9,7 @@ function arve_get_options_defaults( $section ) {
|
|
9 |
'autoplay' => false,
|
10 |
'mode' => 'normal',
|
11 |
'promote_link' => false,
|
12 |
-
'video_maxwidth' =>
|
13 |
'wp_image_cache_time' => 18000,
|
14 |
'last_settings_tab' => '',
|
15 |
'wp_video_override' => true,
|
@@ -202,7 +202,7 @@ function arve_get_settings_definitions() {
|
|
202 |
'attr' => 'video_maxwidth',
|
203 |
'label' => esc_html__('Maximal Width', ARVE_SLUG),
|
204 |
'type' => 'number',
|
205 |
-
'description' =>
|
206 |
),
|
207 |
array(
|
208 |
'hide_from_settings' => true,
|
9 |
'autoplay' => false,
|
10 |
'mode' => 'normal',
|
11 |
'promote_link' => false,
|
12 |
+
'video_maxwidth' => 0,
|
13 |
'wp_image_cache_time' => 18000,
|
14 |
'last_settings_tab' => '',
|
15 |
'wp_video_override' => true,
|
202 |
'attr' => 'video_maxwidth',
|
203 |
'label' => esc_html__('Maximal Width', ARVE_SLUG),
|
204 |
'type' => 'number',
|
205 |
+
'description' => __( 'Maximal size your videos can be displayed, if set to 0 it will default to your themes <code>$content_width</code>.', ARVE_SLUG ),
|
206 |
),
|
207 |
array(
|
208 |
'hide_from_settings' => true,
|