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

Version Description

Download this release

Release Info

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

Code changes from version 9.7.11 to 9.7.14

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.11
7
  * Author: Nicolas Jonas
8
  * Author URI: https://nextgenthemes.com
9
  * License: GPL-3.0
@@ -19,8 +19,8 @@
19
 
20
  namespace Nextgenthemes\ARVE;
21
 
22
- const VERSION = '9.7.11';
23
- const PRO_VERSION_REQUIRED = '5.2.0';
24
  const NUM_TRACKS = 3;
25
  const PLUGIN_FILE = __FILE__;
26
  const PLUGIN_DIR = __DIR__;
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.14
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.14';
23
+ const PRO_VERSION_REQUIRED = '5.3.0-alpha1';
24
  const NUM_TRACKS = 3;
25
  const PLUGIN_FILE = __FILE__;
26
  const PLUGIN_DIR = __DIR__;
build/block.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '0fe6b002f0ec3202e6e4');
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '8b44c0622ac459c3e254');
build/block.js CHANGED
@@ -1 +1 @@
1
- (()=>{"use strict";var e={};function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=window.wp.element,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"nextgenthemes/arve-block","title":"Video Embed (ARVE)","category":"embed","icon":"video-alt3","description":"Advanced Responsive Video Embedder","keywords":["embed","youtube","rumble","vimeo","odysee"],"version":"9.7.10","textdomain":"advanced-responsive-video-embedder","supports":{"align":["wide","full"]},"styles":[],"example":{"attributes":{"url":"https://www.youtube.com/watch?v=oe452WcY7fA","title":"Example Title"}},"editorScript":"arve-block","editorStyle":"arve","attributes":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"upload_date":{"type":"string"},"mode":{"type":"string"},"thumbnail":{"type":"string"},"hide_title":{"type":"boolean"},"grow":{"type":"string"},"fullscreen":{"type":"string"},"play_icon_style":{"type":"string"},"hover_effect":{"type":"string"},"disable_links":{"type":"string"},"align":{"type":"string"},"arve_link":{"type":"string"},"duration":{"type":"string"},"autoplay":{"type":"string"},"lightbox_maxwidth":{"type":"integer"},"sticky":{"type":"string"},"sticky_on_mobile":{"type":"string"},"sticky_position":{"type":"string"},"aspect_ratio":{"type":"string"},"parameters":{"type":"string"},"controlslist":{"type":"string"},"controls":{"type":"string"},"loop":{"type":"boolean"},"muted":{"type":"boolean"},"volume":{"type":"integer"},"random_video_url":{"type":"string"},"random_video_urls":{"type":"string"},"sandbox":{"type":"string"},"thumbnail_url":{"type":"string"}}}'),i=window.wp.i18n,a=window.wp.serverSideRender;var l=e.n(a);const o=window.wp.blockEditor,s=window.wp.components,c=window.wp.blocks,{name:d}=n,p=window.ARVEsettings,u=new DOMParser;function m(e){const t=[];return Object.entries(e).forEach((e=>{let[r,n]=e;const i={label:n,value:r};t.push(i)})),t}function b(e){if("string"!=typeof e.description)return"";if("string"==typeof e.descriptionlinktext){const t=e.description.split(e.descriptionlinktext);return(0,r.createElement)("span",null,(0,r.createElement)("span",null,t[0]),(0,r.createElement)("a",{href:e.descriptionlink},e.descriptionlinktext),",",(0,r.createElement)("span",null,t[1]))}return e.description}function g(e,t){const r=y(e,t);return e/r+":"+t/r}function y(e,t){return t?y(t,e%t):e}(0,c.registerBlockType)(d,{edit:function(e){const{attributes:{align:n},setAttributes:a}=e,c=(0,o.useBlockProps)(),d=function(e){const t=[],n={},a=(0,r.createElement)("p",null,(0,i.__)("To edit the featured image, you need permission to upload media."));let l=!1;Object.values(p).forEach((e=>{n[e.tag]=[]})),Object.entries(p).forEach((t=>{let[c,d]=t,p=e.attributes[c],y="";switch(d.type){case"boolean":"sandbox"===c&&void 0===p&&(p=!0),n[d.tag].push((0,r.createElement)(s.ToggleControl,{key:c,label:d.label,help:b(d),checked:!!p,onChange:t=>e.setAttributes({[c]:t})}));break;case"select":n[d.tag].push((0,r.createElement)(s.SelectControl,{key:c,value:p,label:d.label,help:b(d),options:m(d.options),onChange:t=>e.setAttributes({[c]:t})}));break;case"string":n[d.tag].push((0,r.createElement)(s.TextControl,{key:c,label:d.label,placeholder:d.placeholder,help:b(d),value:p,onChange:t=>(function(e,t,r){if("url"===e){const e=u.parseFromString(t,"text/html").querySelector("iframe");if(e&&e.getAttribute("src")){t=e.src;const n=e.width,i=e.height;n&&i&&r.setAttributes({aspect_ratio:g(n,i)})}}}(c,t,e),e.setAttributes({[c]:t}))}));break;case"attachment":y=e.attributes[c+"_url"],n[d.tag].push((0,r.createElement)(s.BaseControl,{className:"editor-post-featured-image",help:b(d),key:c},(0,r.createElement)(o.MediaUploadCheck,{fallback:a},(0,r.createElement)(o.MediaUpload,{title:(0,i.__)("Thumbnail"),onSelect:t=>(l=t,e.setAttributes({[c]:t.id.toString(),[c+"_url"]:t.url})),unstableFeaturedImageFlow:!0,allowedTypes:["image"],modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,r.createElement)("div",{className:"editor-post-featured-image__container"},(0,r.createElement)(s.Button,{className:p?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":p?(0,i.__)("Edit or update the image"):null,"aria-describedby":p?`editor-post-featured-image-${p}-describedby`:""},!!p&&!!y&&(0,r.createElement)("div",{style:{overflow:"hidden"}},(0,r.createElement)(s.ResponsiveWrapper,{naturalWidth:640,naturalHeight:360,isInline:!0},(0,r.createElement)("img",{src:y,alt:"ARVE Thumbnail",style:{objectFit:"cover"}}))),!p&&(0,i.__)("Set Thumbnail")),(0,r.createElement)(s.DropZone,null))},value:p})),!!p&&!!y&&(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(o.MediaUpload,{title:(0,i.__)("Thumbnail"),onSelect:t=>(l=t,e.setAttributes({[c]:t.id.toString(),[c+"_url"]:t.url})),unstableFeaturedImageFlow:!0,allowedTypes:["image"],modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,r.createElement)(s.Button,{onClick:t,isSecondary:!0},(0,i.__)("Replace Thumbnail"))}})),!!p&&(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(s.Button,{onClick:()=>e.setAttributes({[c]:"",[c+"_url"]:""}),isLink:!0,isDestructive:!0},(0,i.__)("Remove Thumbnail")))))}}));let c=!0;return n.main.push((0,r.createElement)(s.BaseControl,{key:"info",help:(0,i.__)("You can disable the extensive help texts on the ARVE settings page to clean up this UI","advanced-responsive-video-embedder")},(0,r.createElement)(s.BaseControl.VisualLabel,null,(0,i.__)("Info","advanced-responsive-video-embedder")))),Object.keys(n).forEach((e=>{var i;t.push((0,r.createElement)(s.PanelBody,{key:e,title:(i=e,i.charAt(0).toUpperCase()+i.slice(1)),initialOpen:c},n[e])),c=!1})),t}(e);return[(0,r.createElement)("div",t({},c,{key:"block"}),(0,r.createElement)("div",{className:"arve-select-helper",style:{textAlign:"center",padding:".1em"}},(0,i.__)("Select ARVE block","advanced-responsive-video-embedder")),(0,r.createElement)(l(),{block:"nextgenthemes/arve-block",attributes:e.attributes})),(0,r.createElement)(o.InspectorControls,{key:"insp"},d)]}})})();
1
+ (()=>{"use strict";var e={};function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},t.apply(this,arguments)}e.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},e.d=(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);const r=window.wp.element,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"nextgenthemes/arve-block","title":"Video Embed (ARVE)","category":"embed","icon":"video-alt3","description":"Advanced Responsive Video Embedder","keywords":["embed","youtube","rumble","vimeo","odysee"],"version":"9.7.14-alpha1","textdomain":"advanced-responsive-video-embedder","supports":{"align":["wide","full"]},"styles":[],"example":{"attributes":{"url":"https://www.youtube.com/watch?v=oe452WcY7fA","title":"Example Title"}},"editorScript":"arve-block","editorStyle":"arve","attributes":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"upload_date":{"type":"string"},"mode":{"type":"string"},"thumbnail":{"type":"string"},"hide_title":{"type":"boolean"},"grow":{"type":"string"},"fullscreen":{"type":"string"},"play_icon_style":{"type":"string"},"hover_effect":{"type":"string"},"disable_links":{"type":"string"},"align":{"type":"string"},"arve_link":{"type":"string"},"duration":{"type":"string"},"autoplay":{"type":"string"},"lightbox_maxwidth":{"type":"integer"},"sticky":{"type":"string"},"sticky_on_mobile":{"type":"string"},"sticky_position":{"type":"string"},"aspect_ratio":{"type":"string"},"parameters":{"type":"string"},"controlslist":{"type":"string"},"controls":{"type":"string"},"loop":{"type":"boolean"},"muted":{"type":"boolean"},"volume":{"type":"integer"},"random_video_url":{"type":"string"},"random_video_urls":{"type":"string"},"sandbox":{"type":"string"},"thumbnail_url":{"type":"string"}}}'),i=window.wp.i18n,a=window.wp.serverSideRender;var l=e.n(a);const o=window.wp.blockEditor,s=window.wp.components,c=window.wp.blocks,{name:d}=n,p=window.ARVEsettings,u=new DOMParser;function m(e){const t=[];return Object.entries(e).forEach((e=>{let[r,n]=e;const i={label:n,value:r};t.push(i)})),t}function b(e){if("string"!=typeof e.description)return"";if("string"==typeof e.descriptionlinktext){const t=e.description.split(e.descriptionlinktext);return(0,r.createElement)("span",null,(0,r.createElement)("span",null,t[0]),(0,r.createElement)("a",{href:e.descriptionlink},e.descriptionlinktext),",",(0,r.createElement)("span",null,t[1]))}return e.description}function g(e,t){const r=y(e,t);return e/r+":"+t/r}function y(e,t){return t?y(t,e%t):e}(0,c.registerBlockType)(d,{edit:function(e){const{attributes:{align:n},setAttributes:a}=e,c=(0,o.useBlockProps)(),d=function(e){const t=[],n={},a=(0,r.createElement)("p",null,(0,i.__)("To edit the featured image, you need permission to upload media."));let l=!1;Object.values(p).forEach((e=>{n[e.tag]=[]})),Object.entries(p).forEach((t=>{let[c,d]=t,p=e.attributes[c],y="";switch(d.type){case"boolean":"sandbox"===c&&void 0===p&&(p=!0),n[d.tag].push((0,r.createElement)(s.ToggleControl,{key:c,label:d.label,help:b(d),checked:!!p,onChange:t=>e.setAttributes({[c]:t})}));break;case"select":n[d.tag].push((0,r.createElement)(s.SelectControl,{key:c,value:p,label:d.label,help:b(d),options:m(d.options),onChange:t=>e.setAttributes({[c]:t})}));break;case"string":n[d.tag].push((0,r.createElement)(s.TextControl,{key:c,label:d.label,placeholder:d.placeholder,help:b(d),value:p,onChange:t=>(function(e,t,r){if("url"===e){const e=u.parseFromString(t,"text/html").querySelector("iframe");if(e&&e.getAttribute("src")){t=e.src;const n=e.width,i=e.height;n&&i&&r.setAttributes({aspect_ratio:g(n,i)})}}}(c,t,e),e.setAttributes({[c]:t}))}));break;case"attachment":y=e.attributes[c+"_url"],n[d.tag].push((0,r.createElement)(s.BaseControl,{className:"editor-post-featured-image",help:b(d),key:c},(0,r.createElement)(o.MediaUploadCheck,{fallback:a},(0,r.createElement)(o.MediaUpload,{title:(0,i.__)("Thumbnail"),onSelect:t=>(l=t,e.setAttributes({[c]:t.id.toString(),[c+"_url"]:t.url})),unstableFeaturedImageFlow:!0,allowedTypes:["image"],modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,r.createElement)("div",{className:"editor-post-featured-image__container"},(0,r.createElement)(s.Button,{className:p?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":p?(0,i.__)("Edit or update the image"):null,"aria-describedby":p?`editor-post-featured-image-${p}-describedby`:""},!!p&&!!y&&(0,r.createElement)("div",{style:{overflow:"hidden"}},(0,r.createElement)(s.ResponsiveWrapper,{naturalWidth:640,naturalHeight:360,isInline:!0},(0,r.createElement)("img",{src:y,alt:"ARVE Thumbnail",style:{width:"100%",height:"100%",objectFit:"cover"}}))),!p&&(0,i.__)("Set Thumbnail")),(0,r.createElement)(s.DropZone,null))},value:p})),!!p&&!!y&&(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(o.MediaUpload,{title:(0,i.__)("Thumbnail"),onSelect:t=>(l=t,e.setAttributes({[c]:t.id.toString(),[c+"_url"]:t.url})),unstableFeaturedImageFlow:!0,allowedTypes:["image"],modalClass:"editor-post-featured-image__media-modal",render:e=>{let{open:t}=e;return(0,r.createElement)(s.Button,{onClick:t,isSecondary:!0},(0,i.__)("Replace Thumbnail"))}})),!!p&&(0,r.createElement)(o.MediaUploadCheck,null,(0,r.createElement)(s.Button,{onClick:()=>e.setAttributes({[c]:"",[c+"_url"]:""}),isLink:!0,isDestructive:!0},(0,i.__)("Remove Thumbnail")))))}}));let c=!0;return n.main.push((0,r.createElement)(s.BaseControl,{key:"info",help:(0,i.__)("You can disable the extensive help texts on the ARVE settings page to clean up this UI","advanced-responsive-video-embedder")},(0,r.createElement)(s.BaseControl.VisualLabel,null,(0,i.__)("Info","advanced-responsive-video-embedder")))),Object.keys(n).forEach((e=>{var i;t.push((0,r.createElement)(s.PanelBody,{key:e,title:(i=e,i.charAt(0).toUpperCase()+i.slice(1)),initialOpen:c},n[e])),c=!1})),t}(e);return[(0,r.createElement)("div",t({},c,{key:"block"}),(0,r.createElement)("div",{className:"arve-select-helper",style:{textAlign:"center",padding:".1em"}},(0,i.__)("Select ARVE block","advanced-responsive-video-embedder")),(0,r.createElement)(l(),{block:"nextgenthemes/arve-block",attributes:e.attributes})),(0,r.createElement)(o.InspectorControls,{key:"insp"},d)]}})})();
changelog.md CHANGED
@@ -4,20 +4,25 @@
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
- ### 2022-09-11 9.7.11 ###
 
 
 
 
 
8
 
9
  * Fix: Block not registering.
10
 
11
- ### 2022-09-09 9.7.10 ###
12
 
13
- ##### Improvents Gutenberg Block #####
14
  * Introduces clickable area above the Block in the Editor.
15
  * Fixed Thumbnail image overflowing.
16
  * Removed maximal width setting when not aligned. This concept does not fit Gutenberg. Width should be controlled by setting the block to wide or full alignment.
17
  * Introduces a recommended `block.json`.
18
  * Some other minor improvements.
19
 
20
- ### 2022-09-04 9.7.8 ###
21
 
22
  * New: Add new 'Darken' hover effect option for Pro Addon.
23
  * Removed Ustream from providers (not functional bought up by IBM)
@@ -47,7 +52,7 @@
47
 
48
  ### 2021-12-07 9.6.0 ###
49
 
50
- * 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.
51
  * New: ARVE now has its own dependecy free Shortcode creator dialog in Classic Editor. It will pop up when you click the "Embed Video" button that previously opened up Shortcode UI dialog.
52
  * New: Support for tv.gab.com
53
  * Improved: Video files will be embedded with `preload="none"` to prevent desktop browsers from buffering videos without interaction.
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
+ ### 2022-08-22 9.7.14 ###
8
+
9
+ * Improved: Simplyfied and reduced debug info.
10
+ * Improved: Adjustments for updated ARVE Pro version.
11
+
12
+ ### 2022-08-11 9.7.11 ###
13
 
14
  * Fix: Block not registering.
15
 
16
+ ### 2022-08-09 9.7.10 ###
17
 
18
+ ##### Improvents for Gutenberg Block #####
19
  * Introduces clickable area above the Block in the Editor.
20
  * Fixed Thumbnail image overflowing.
21
  * Removed maximal width setting when not aligned. This concept does not fit Gutenberg. Width should be controlled by setting the block to wide or full alignment.
22
  * Introduces a recommended `block.json`.
23
  * Some other minor improvements.
24
 
25
+ ### 2022-08-04 9.7.8 ###
26
 
27
  * New: Add new 'Darken' hover effect option for Pro Addon.
28
  * Removed Ustream from providers (not functional bought up by IBM)
52
 
53
  ### 2021-12-07 9.6.0 ###
54
 
55
+ * Deprecated: 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.
56
  * New: ARVE now has its own dependecy free Shortcode creator dialog in Classic Editor. It will pop up when you click the "Embed Video" button that previously opened up Shortcode UI dialog.
57
  * New: Support for tv.gab.com
58
  * Improved: Video files will be embedded with `preload="none"` to prevent desktop browsers from buffering videos without interaction.
php/Common/Admin/EDD/PluginUpdater.php CHANGED
@@ -97,7 +97,7 @@ class PluginUpdater {
97
  global $pagenow;
98
 
99
  if ( ! is_object( $_transient_data ) ) {
100
- $_transient_data = new stdClass();
101
  }
102
 
103
  if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
@@ -177,7 +177,7 @@ class PluginUpdater {
177
 
178
  if ( ! isset( $update_cache->response[ $this->name ] ) ) {
179
  if ( ! is_object( $update_cache ) ) {
180
- $update_cache = new stdClass();
181
  }
182
  $update_cache->response[ $this->name ] = $this->get_repo_api_data();
183
  }
97
  global $pagenow;
98
 
99
  if ( ! is_object( $_transient_data ) ) {
100
+ $_transient_data = new \stdClass();
101
  }
102
 
103
  if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
177
 
178
  if ( ! isset( $update_cache->response[ $this->name ] ) ) {
179
  if ( ! is_object( $update_cache ) ) {
180
+ $update_cache = new \stdClass();
181
  }
182
  $update_cache->response[ $this->name ] = $this->get_repo_api_data();
183
  }
php/Common/Admin/partials/debug-info.php CHANGED
@@ -3,7 +3,7 @@ namespace Nextgenthemes\ARVE\Common\Admin;
3
 
4
  use function \Nextgenthemes\ARVE\Common\get_var_dump;
5
 
6
- // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
7
  ?>
8
  <textarea class="ngt-debug-textarea">
9
  ARVE: <?php echo esc_html( plugin_ver_status( 'advanced-responsive-video-embedder/advanced-responsive-video-embedder.php' ) . "\n" ); ?>
@@ -20,15 +20,8 @@ REST URL: <?php echo esc_html( get_rest_url( null, $this->rest_namespa
20
  <?php print_network_active_plugins(); ?>
21
 
22
  ARVE Options:
23
- <?php echo wp_kses( get_var_dump( get_option( 'nextgenthemes_arve' ) ), array() ); ?>
24
 
25
  Dismissed Notices:
26
- <?php echo wp_kses( get_var_dump( get_user_meta( get_current_user_id(), 'dnh_dismissed_notices' ) ), array() ); ?>
27
-
28
- oembed_dataparse:
29
- <?php print_r( list_hooks('oembed_dataparse') ); ?>
30
-
31
- embed_oembed_html:
32
- <?php print_r( list_hooks('embed_oembed_html') ); ?>
33
-
34
  </textarea>
3
 
4
  use function \Nextgenthemes\ARVE\Common\get_var_dump;
5
 
6
+ // phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_var_export
7
  ?>
8
  <textarea class="ngt-debug-textarea">
9
  ARVE: <?php echo esc_html( plugin_ver_status( 'advanced-responsive-video-embedder/advanced-responsive-video-embedder.php' ) . "\n" ); ?>
20
  <?php print_network_active_plugins(); ?>
21
 
22
  ARVE Options:
23
+ <?php echo wp_kses( var_export( get_option( 'nextgenthemes_arve' ), true ), array() ); ?>
24
 
25
  Dismissed Notices:
26
+ <?php echo wp_kses( var_export( get_user_meta( get_current_user_id(), 'dnh_dismissed_notices' ), true ), array() ); ?>
 
 
 
 
 
 
 
27
  </textarea>
php/Common/Settings.php CHANGED
@@ -278,7 +278,7 @@ class Settings {
278
  <?php
279
  printf(
280
  // translators: PHP version, URL, Contact URL
281
- wp_kses( __( 'Your PHP version %1$s is very <a href="%2$s">outdated, insecure and slow</a>. No pressure, this plugin will continue to work with PHP 5.6, but at some undecided point I like to use features from PHP 7. If you can not update for some reason please tell <a href="%3$s">tell me</a>. WordPress itself planned to require PHP 7 in a feature release but decided not to persue this for now because so many people still run on outdated versions. WordPress already has beta support for 8.0 but I would not go with 8.0 just yet.', 'advanced-responsive-video-embedder' ), $link_only ),
282
  esc_html( PHP_VERSION ),
283
  esc_url( 'https://www.php.net/supported-versions' ),
284
  esc_url( 'https://nextgenthemes.com/contact/' )
@@ -287,14 +287,14 @@ class Settings {
287
  </p>
288
  </div>
289
  <?php
290
- } elseif ( \version_compare( PHP_VERSION, '7.3.26', '<' ) ) {
291
  ?>
292
  <div class="ngt-sidebar-box">
293
  <p>
294
  <?php
295
  printf(
296
  // translators: URL
297
- wp_kses( __( 'Just a heads up, your PHP version %1$s is outdated and potentially insecure. See what versions are <a href="%2$s">good here</a>. WordPress already has beta support for 8.0 but I would not go with 8.0 just yet.', 'advanced-responsive-video-embedder' ), $link_only ),
298
  esc_html( PHP_VERSION ),
299
  esc_url( 'https://www.php.net/supported-versions' )
300
  );
278
  <?php
279
  printf(
280
  // translators: PHP version, URL, Contact URL
281
+ wp_kses( __( 'Your PHP version %1$s is very <a href="%2$s">outdated, insecure and slow</a>. No pressure, this plugin will continue to work with PHP 5.6, but at some undecided point I like to use features from PHP 7. If you can not update for some reason please tell <a href="%3$s">tell me</a>. WordPress itself planned to require PHP 7 in a feature release but decided not to persue this for now because so many people still run on outdated versions.', 'advanced-responsive-video-embedder' ), $link_only ),
282
  esc_html( PHP_VERSION ),
283
  esc_url( 'https://www.php.net/supported-versions' ),
284
  esc_url( 'https://nextgenthemes.com/contact/' )
287
  </p>
288
  </div>
289
  <?php
290
+ } elseif ( \version_compare( PHP_VERSION, '7.3', '<=' ) ) {
291
  ?>
292
  <div class="ngt-sidebar-box">
293
  <p>
294
  <?php
295
  printf(
296
  // translators: URL
297
+ wp_kses( __( 'Just a heads up, your PHP version %1$s is outdated and insecure. See what versions are <a href="%2$s">good here</a>. ARVE <strong>currently</strong> works with PHP as old as 5.6 like WP itself but may require 7.2 or 7.4+ in the future.', 'advanced-responsive-video-embedder' ), $link_only ),
298
  esc_html( PHP_VERSION ),
299
  esc_url( 'https://www.php.net/supported-versions' )
300
  );
php/functions-html-output.php CHANGED
@@ -99,9 +99,9 @@ function build_video_tag( array $a ) {
99
  array(
100
  'name' => 'video',
101
  'tag' => 'video',
102
- 'inner_html' => $a['video_sources_html'] . build_tracks_html( $a ),
103
  'attr' => array(
104
- // WPmaster
105
  'autoplay' => $autoplay,
106
  'controls' => $a['controls'],
107
  'controlslist' => $a['controlslist'],
@@ -121,40 +121,6 @@ function build_video_tag( array $a ) {
121
  );
122
  }
123
 
124
- function build_tracks_html( array $a ) {
125
-
126
- $tracks_html = '';
127
-
128
- for ( $n = 1; $n <= NUM_TRACKS; $n++ ) {
129
-
130
- if ( empty( $a[ "track_{$n}" ] ) ) {
131
- return '';
132
- }
133
-
134
- preg_match(
135
- '#-(?<type>captions|chapters|descriptions|metadata|subtitles)-(?<lang>[a-z]{2}).vtt$#i',
136
- $a[ "track_{$n}" ],
137
- $matches
138
- );
139
-
140
- $label = empty( $a[ "track_{$n}_label" ] ) ?
141
- get_language_name_from_code( $matches['lang'] ) :
142
- $a[ "track_{$n}_label" ];
143
-
144
- $attr = array(
145
- 'default' => ( 1 === $n ) ? true : false,
146
- 'kind' => $matches['type'],
147
- 'label' => $label,
148
- 'src' => $a[ "track_{$n}" ],
149
- 'srclang' => $matches['lang'],
150
- );
151
-
152
- $tracks_html .= sprintf( '<track%s>', Common\attr( $attr ) );
153
- }//end for
154
-
155
- return $tracks_html;
156
- }
157
-
158
  function html_id( $html_attr ) {
159
 
160
  if ( ! str_contains( $html_attr, 'id=' ) ) {
99
  array(
100
  'name' => 'video',
101
  'tag' => 'video',
102
+ 'inner_html' => $a['video_sources_html'] . tracks_html( $a['tracks'] ),
103
  'attr' => array(
104
+ // WP
105
  'autoplay' => $autoplay,
106
  'controls' => $a['controls'],
107
  'controlslist' => $a['controlslist'],
121
  );
122
  }
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  function html_id( $html_attr ) {
125
 
126
  if ( ! str_contains( $html_attr, 'id=' ) ) {
php/functions-settings.php CHANGED
@@ -427,15 +427,16 @@ function all_settings() {
427
  ),
428
  'hover_effect' => array(
429
  'tag' => 'pro',
430
- 'default' => 'zoom',
431
  'label' => __( 'Hover Effect (Lazyload/Lightbox only)', 'advanced-responsive-video-embedder' ),
432
  'type' => 'select',
433
  'options' => array(
434
  '' => __( 'Default (settings page)', 'advanced-responsive-video-embedder' ),
 
435
  'zoom' => __( 'Zoom Thumbnail', 'advanced-responsive-video-embedder' ),
436
  'rectangle' => __( 'Move Rectangle in', 'advanced-responsive-video-embedder' ),
437
- 'darken' => __( 'Darken', 'advanced-responsive-video-embedder' ),
438
  'none' => __( 'None', 'advanced-responsive-video-embedder' ),
 
439
  ),
440
  ),
441
  'disable_links' => array(
@@ -459,18 +460,6 @@ function all_settings() {
459
  'center' => __( 'Center', 'advanced-responsive-video-embedder' ),
460
  ),
461
  ),
462
- 'lightbox_script' => array(
463
- 'tag' => 'pro',
464
- 'default' => 'bigpicture',
465
- 'shortcode' => false,
466
- 'label' => __( 'Lightbox Script', 'advanced-responsive-video-embedder' ),
467
- 'type' => 'select',
468
- 'options' => array(
469
- 'bigpicture' => __( 'BigPicture', 'advanced-responsive-video-embedder' ),
470
- 'lity' => __( 'Lity', 'advanced-responsive-video-embedder' ),
471
- ),
472
- 'description' => __( 'Only use Lity if you have issues with Big Picture', 'advanced-responsive-video-embedder' ),
473
- ),
474
  'arve_link' => array(
475
  'default' => false,
476
  'label' => __( 'ARVE Link', 'advanced-responsive-video-embedder' ),
427
  ),
428
  'hover_effect' => array(
429
  'tag' => 'pro',
430
+ 'default' => 'darken',
431
  'label' => __( 'Hover Effect (Lazyload/Lightbox only)', 'advanced-responsive-video-embedder' ),
432
  'type' => 'select',
433
  'options' => array(
434
  '' => __( 'Default (settings page)', 'advanced-responsive-video-embedder' ),
435
+ 'darken' => __( 'Darken', 'advanced-responsive-video-embedder' ),
436
  'zoom' => __( 'Zoom Thumbnail', 'advanced-responsive-video-embedder' ),
437
  'rectangle' => __( 'Move Rectangle in', 'advanced-responsive-video-embedder' ),
 
438
  'none' => __( 'None', 'advanced-responsive-video-embedder' ),
439
+ 'custom' => __( 'Custom (for your own CSS styles', 'advanced-responsive-video-embedder' ),
440
  ),
441
  ),
442
  'disable_links' => array(
460
  'center' => __( 'Center', 'advanced-responsive-video-embedder' ),
461
  ),
462
  ),
 
 
 
 
 
 
 
 
 
 
 
 
463
  'arve_link' => array(
464
  'default' => false,
465
  'label' => __( 'ARVE Link', 'advanced-responsive-video-embedder' ),
php/functions-shortcode-args.php CHANGED
@@ -369,10 +369,20 @@ function arg_iframe_src( array $a ) {
369
 
370
  $a['src'] = iframe_src_args( $a['src'], $a );
371
  $a['src'] = iframe_src_autoplay_args( $a['autoplay'], $a );
 
372
 
373
  return $a['src'];
374
  }
375
 
 
 
 
 
 
 
 
 
 
376
  function build_iframe_src( array $a ) {
377
 
378
  if ( ! $a['provider'] || ! $a['id'] ) {
@@ -797,7 +807,14 @@ function args_detect_html5( array $a ) {
797
  }
798
 
799
  if ( $a[ $ext ] ) {
800
- $a['video_sources_html'] .= sprintf( '<source type="%s" src="%s">', get_video_type( $ext ), $a[ $ext ] );
 
 
 
 
 
 
 
801
 
802
  if ( empty( $a['first_video_file'] ) ) {
803
  $a['first_video_file'] = $a[ $ext ];
@@ -808,7 +825,53 @@ function args_detect_html5( array $a ) {
808
 
809
  if ( $a['video_sources_html'] ) {
810
  $a['provider'] = 'html5';
 
811
  }
812
 
813
  return $a;
814
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
369
 
370
  $a['src'] = iframe_src_args( $a['src'], $a );
371
  $a['src'] = iframe_src_autoplay_args( $a['autoplay'], $a );
372
+ $a['src'] = iframe_src_jsapi_arg( $a['src'], $a );
373
 
374
  return $a['src'];
375
  }
376
 
377
+ function iframe_src_jsapi_arg( $src, $a ) {
378
+
379
+ if ( function_exists('Nextgenthemes\ARVE\Pro\init') && 'youtube' === $a['provider'] ) {
380
+ $src = add_query_arg( [ 'enablejsapi' => 1 ], $src );
381
+ }
382
+
383
+ return $src;
384
+ }
385
+
386
  function build_iframe_src( array $a ) {
387
 
388
  if ( ! $a['provider'] || ! $a['id'] ) {
807
  }
808
 
809
  if ( $a[ $ext ] ) {
810
+
811
+ $source = array(
812
+ 'src' => $a[ $ext ],
813
+ 'type' => get_video_type( $ext ),
814
+ );
815
+
816
+ $a['video_sources'][] = $source;
817
+ $a['video_sources_html'] .= sprintf( '<source type="%s" src="%s">', $source['type'], $source['src'], $a[ $ext ] );
818
 
819
  if ( empty( $a['first_video_file'] ) ) {
820
  $a['first_video_file'] = $a[ $ext ];
825
 
826
  if ( $a['video_sources_html'] ) {
827
  $a['provider'] = 'html5';
828
+ $a['tracks'] = detect_tracks( $a );
829
  }
830
 
831
  return $a;
832
  }
833
+
834
+ function detect_tracks( array $a ) {
835
+
836
+ $tracks = array();
837
+
838
+ for ( $n = 1; $n <= NUM_TRACKS; $n++ ) {
839
+
840
+ if ( empty( $a[ "track_{$n}" ] ) ) {
841
+ return array();
842
+ }
843
+
844
+ preg_match(
845
+ '#-(?<type>captions|chapters|descriptions|metadata|subtitles)-(?<lang>[a-z]{2}).vtt$#i',
846
+ $a[ "track_{$n}" ],
847
+ $matches
848
+ );
849
+
850
+ $label = empty( $a[ "track_{$n}_label" ] ) ?
851
+ get_language_name_from_code( $matches['lang'] ) :
852
+ $a[ "track_{$n}_label" ];
853
+
854
+ $track_attr = array(
855
+ 'default' => ( 1 === $n ) ? true : false,
856
+ 'kind' => $matches['type'],
857
+ 'label' => $label,
858
+ 'src' => $a[ "track_{$n}" ],
859
+ 'srclang' => $matches['lang'],
860
+ );
861
+
862
+ $tracks[] = $track_attr;
863
+ }//end for
864
+
865
+ return $tracks;
866
+ }
867
+
868
+ function tracks_html( array $tracks ) {
869
+
870
+ $html = '';
871
+
872
+ foreach ( $tracks as $track_attr ) {
873
+ $html .= sprintf( '<track%s>', Common\attr( $track_attr ) );
874
+ }
875
+
876
+ return $html;
877
+ }
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.7.11
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -152,7 +152,7 @@ Please report it on [nextgenthemes.com/support/](https://nextgenthemes.com/suppo
152
 
153
  ### I’m experiencing these errors on Google Search Console ###
154
 
155
- Best option to resolve these errors is to get [ARVE Pro](https://nextgenthemes.com/plugins/arve-pro/) as it fills these in for you hassle free, only activate the addon - done. For more options please see the [detailed answer](https://nextgenthemes.com/plugins/arve/faq/).
156
 
157
  ### How to get the pro version working? ###
158
 
@@ -196,20 +196,25 @@ Please read the [official documentation](https://wordpress.org/support/article/m
196
  * [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
197
  * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
198
 
199
- ### 2022-09-11 9.7.11 ###
 
 
 
 
 
200
 
201
  * Fix: Block not registering.
202
 
203
- ### 2022-09-09 9.7.10 ###
204
 
205
- ##### Improvents Gutenberg Block #####
206
  * Introduces clickable area above the Block in the Editor.
207
  * Fixed Thumbnail image overflowing.
208
  * Removed maximal width setting when not aligned. This concept does not fit Gutenberg. Width should be controlled by setting the block to wide or full alignment.
209
  * Introduces a recommended `block.json`.
210
  * Some other minor improvements.
211
 
212
- ### 2022-09-04 9.7.8 ###
213
 
214
  * New: Add new 'Darken' hover effect option for Pro Addon.
215
  * Removed Ustream from providers (not functional bought up by IBM)
@@ -239,7 +244,7 @@ Please read the [official documentation](https://wordpress.org/support/article/m
239
 
240
  ### 2021-12-07 9.6.0 ###
241
 
242
- * 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.
243
  * New: ARVE now has its own dependecy free Shortcode creator dialog in Classic Editor. It will pop up when you click the "Embed Video" button that previously opened up Shortcode UI dialog.
244
  * New: Support for tv.gab.com
245
  * Improved: Video files will be embedded with `preload="none"` to prevent desktop browsers from buffering videos without interaction.
5
  Requires at least: 4.9.16
6
  Tested up to: 5.9.0
7
  Requires PHP: 5.6
8
+ Stable tag: 9.7.14
9
  License: GPL-3.0
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
152
 
153
  ### I’m experiencing these errors on Google Search Console ###
154
 
155
+ Best option to resolve these errors is to get [ARVE Pro](https://nextgenthemes.com/plugins/arve-pro/) as it fills these in for you hassle-free, only activate the add-on - done. For more options, please see the [detailed answer](https://nextgenthemes.com/plugins/arve/faq/).
156
 
157
  ### How to get the pro version working? ###
158
 
196
  * [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
197
  * [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/arve-random-video/#changelog)
198
 
199
+ ### 2022-08-22 9.7.14 ###
200
+
201
+ * Improved: Simplyfied and reduced debug info.
202
+ * Improved: Adjustments for updated ARVE Pro version.
203
+
204
+ ### 2022-08-11 9.7.11 ###
205
 
206
  * Fix: Block not registering.
207
 
208
+ ### 2022-08-09 9.7.10 ###
209
 
210
+ ##### Improvents for Gutenberg Block #####
211
  * Introduces clickable area above the Block in the Editor.
212
  * Fixed Thumbnail image overflowing.
213
  * Removed maximal width setting when not aligned. This concept does not fit Gutenberg. Width should be controlled by setting the block to wide or full alignment.
214
  * Introduces a recommended `block.json`.
215
  * Some other minor improvements.
216
 
217
+ ### 2022-08-04 9.7.8 ###
218
 
219
  * New: Add new 'Darken' hover effect option for Pro Addon.
220
  * Removed Ustream from providers (not functional bought up by IBM)
244
 
245
  ### 2021-12-07 9.6.0 ###
246
 
247
+ * Deprecated: 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.
248
  * New: ARVE now has its own dependecy free Shortcode creator dialog in Classic Editor. It will pop up when you click the "Embed Video" button that previously opened up Shortcode UI dialog.
249
  * New: Support for tv.gab.com
250
  * Improved: Video files will be embedded with `preload="none"` to prevent desktop browsers from buffering videos without interaction.
src/block.json CHANGED
@@ -13,7 +13,7 @@
13
  "vimeo",
14
  "odysee"
15
  ],
16
- "version": "9.7.11",
17
  "textdomain": "advanced-responsive-video-embedder",
18
  "supports": {
19
  "align": [
13
  "vimeo",
14
  "odysee"
15
  ],
16
+ "version": "9.7.14",
17
  "textdomain": "advanced-responsive-video-embedder",
18
  "supports": {
19
  "align": [
src/block.tsx CHANGED
@@ -9,7 +9,7 @@
9
  import json from './block.json';
10
  import { __ } from '@wordpress/i18n';
11
  import ServerSideRender from '@wordpress/server-side-render';
12
- import { createElement, Fragment } from '@wordpress/element';
13
  import {
14
  MediaUpload,
15
  MediaUploadCheck,
@@ -229,6 +229,8 @@ function BuildControls( props ) {
229
  src={ url }
230
  alt="ARVE Thumbnail"
231
  style={ {
 
 
232
  objectFit:
233
  'cover',
234
  } }
@@ -379,7 +381,7 @@ function Edit( props ) {
379
  </div>,
380
  <InspectorControls key="insp">{ controls }</InspectorControls>,
381
  ];
382
- };
383
 
384
  registerBlockType( name, {
385
  edit: Edit,
9
  import json from './block.json';
10
  import { __ } from '@wordpress/i18n';
11
  import ServerSideRender from '@wordpress/server-side-render';
12
+ //import { createElement, Fragment } from '@wordpress/element';
13
  import {
14
  MediaUpload,
15
  MediaUploadCheck,
229
  src={ url }
230
  alt="ARVE Thumbnail"
231
  style={ {
232
+ width: '100%',
233
+ height: '100%',
234
  objectFit:
235
  'cover',
236
  } }
381
  </div>,
382
  <InspectorControls key="insp">{ controls }</InspectorControls>,
383
  ];
384
+ }
385
 
386
  registerBlockType( name, {
387
  edit: Edit,