Version Description
Download this release
Release Info
Developer | nico23 |
Plugin | ARVE Advanced Responsive Video Embedder (YouTube, Vimeo, HTML5 Video …) |
Version | 9.4.1 |
Comparing to | |
See all releases |
Code changes from version 9.3.5 to 9.4.1
- advanced-responsive-video-embedder.php +8 -2
- build/admin.asset.php +1 -1
- build/block.asset.php +1 -1
- build/common/notice-ajax.asset.php +1 -1
- build/common/settings.asset.php +1 -1
- build/main.asset.php +1 -1
- build/main.js +1 -1
- build/shortcode-ui.asset.php +1 -1
- changelog.md +6 -0
- php/Admin/functions-admin.php +61 -24
- php/Admin/partials/pro-ad.html +0 -13
- php/Common/Admin/NoticeFactory.php +0 -87
- php/Common/Admin/functions-notices.php +13 -1
- php/Common/Admin/partials/debug-info.php +4 -1
- php/Common/Settings.php +0 -1
- php/Common/functions-assets.php +3 -3
- php/Common/init.php +0 -1
- php/ShortcodeArgs.php +11 -7
- php/functions-assets.php +5 -4
- php/functions-host-properties.php +30 -12
- php/functions-oembed.php +9 -2
- php/functions-shortcodes.php +0 -45
- readme.txt +9 -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
|
@@ -21,7 +21,7 @@
|
|
21 |
|
22 |
namespace Nextgenthemes\ARVE;
|
23 |
|
24 |
-
const VERSION = '9.
|
25 |
const PRO_VERSION_REQUIRED = '5.1.5';
|
26 |
const NUM_TRACKS = 3;
|
27 |
const PLUGIN_FILE = __FILE__;
|
@@ -55,6 +55,12 @@ function init_920() {
|
|
55 |
require_once PLUGIN_DIR . '/php/functions-validation.php';
|
56 |
require_once PLUGIN_DIR . '/php/functions-host-properties.php';
|
57 |
require_once PLUGIN_DIR . '/php/functions-settings.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
require_once PLUGIN_DIR . '/php/Admin/functions-admin.php';
|
59 |
require_once PLUGIN_DIR . '/php/Admin/functions-settings-page.php';
|
60 |
|
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.4.1
|
7 |
* Author: Nicolas Jonas
|
8 |
* Author URI: https://nextgenthemes.com
|
9 |
* License: GPL-3.0
|
21 |
|
22 |
namespace Nextgenthemes\ARVE;
|
23 |
|
24 |
+
const VERSION = '9.4.1';
|
25 |
const PRO_VERSION_REQUIRED = '5.1.5';
|
26 |
const NUM_TRACKS = 3;
|
27 |
const PLUGIN_FILE = __FILE__;
|
55 |
require_once PLUGIN_DIR . '/php/functions-validation.php';
|
56 |
require_once PLUGIN_DIR . '/php/functions-host-properties.php';
|
57 |
require_once PLUGIN_DIR . '/php/functions-settings.php';
|
58 |
+
|
59 |
+
if ( is_admin() ) {
|
60 |
+
if ( is_file(PLUGIN_DIR . '/vendor/autoload.php') ) {
|
61 |
+
require_once PLUGIN_DIR . '/vendor/autoload.php';
|
62 |
+
}
|
63 |
+
}
|
64 |
require_once PLUGIN_DIR . '/php/Admin/functions-admin.php';
|
65 |
require_once PLUGIN_DIR . '/php/Admin/functions-settings-page.php';
|
66 |
|
build/admin.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'b4a39bf02525fb8ba7d639a5df33a1e2');
|
build/block.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-server-side-render'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-server-side-render'), 'version' => 'd28d8939e714b8930e49760587e5b8a8');
|
build/common/notice-ajax.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '90466d01301576684355c20437dddf78');
|
build/common/settings.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '76cb223af8ff690bafea48b1eaa23a21');
|
build/main.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'd497f551376036d413a77c615347c28f');
|
build/main.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({7:function(e,t,r){"use strict";r.r(t),r(8);const o=document.querySelectorAll.bind(document),n=window.jQuery;function i(){o(".arve p, .arve .video-wrap, .arve .fluid-width-video-wrapper, .arve .fluid-vids").forEach(e=>{u(e)}),o(".ast-oembed-container").forEach(e=>{e.querySelector(".arve")&&u(e)}),o(".arve br").forEach(e=>{e.remove()}),o(".arve-iframe, .arve-video").forEach(e=>{e.removeAttribute("width"),e.removeAttribute("height"),e.removeAttribute("style")}),o(".wp-block-embed").forEach(e=>{if(e.querySelector(".arve")){e.classList.remove("wp-embed-aspect-16-9","wp-has-aspect-ratio");const t=e.querySelector(".wp-block-embed__wrapper");t&&u(t)}})}function u(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}"html"!==document.documentElement.id&&(document.documentElement.id?document.body.id||(document.body.id="html"):document.documentElement.id="html"),i(),document.addEventListener("DOMContentLoaded",()=>{
|
1 |
+
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({7:function(e,t,r){"use strict";r.r(t),r(8);const o=document.querySelectorAll.bind(document),n=window.jQuery;function i(){o(".arve p, .arve .video-wrap, .arve .fluid-width-video-wrapper, .arve .fluid-vids").forEach(e=>{u(e)}),o(".ast-oembed-container").forEach(e=>{e.querySelector(".arve")&&u(e)}),o(".arve br").forEach(e=>{e.remove()}),o(".arve-iframe, .arve-video").forEach(e=>{e.removeAttribute("width"),e.removeAttribute("height"),e.removeAttribute("style")}),o(".wp-block-embed").forEach(e=>{if(e.querySelector(".arve")){e.classList.remove("wp-embed-aspect-16-9","wp-has-aspect-ratio");const t=e.querySelector(".wp-block-embed__wrapper");t&&u(t)}})}function u(e){const t=e.parentNode;if(t){for(;t&&e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}"html"!==document.documentElement.id&&(document.documentElement.id?document.body.id||(document.body.id="html"):document.documentElement.id="html"),i(),document.addEventListener("DOMContentLoaded",()=>{i()}),n&&void 0!==n.fn.fitVids&&n(document).ready(()=>{setTimeout(()=>{i()},1)})},8:function(e,t,r){}});
|
build/shortcode-ui.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '4a704163d19f36da50268b5c7655c515');
|
changelog.md
CHANGED
@@ -4,6 +4,12 @@
|
|
4 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
5 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/random-video/#changelog)
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
### 2021-01-25 9.3.5 ###
|
8 |
|
9 |
* Fix: Avoid passing `null` to `str_contains`.
|
4 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
5 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/random-video/#changelog)
|
6 |
|
7 |
+
### 2021-01-28 9.4.1 ###
|
8 |
+
|
9 |
+
* Fix: (hopefully) Non dismissible admin notices. Also removed the notice that came with 9.0-beta completely.
|
10 |
+
* Fix: rumble.com and other providers.
|
11 |
+
* Improved: The __tiny__ JavaScript of ARVE is now loaded in the `<head>` with `<script async src=` this will deal with edge cases when styles would get applied late.
|
12 |
+
|
13 |
### 2021-01-25 9.3.5 ###
|
14 |
|
15 |
* Fix: Avoid passing `null` to `str_contains`.
|
php/Admin/functions-admin.php
CHANGED
@@ -4,15 +4,33 @@ namespace Nextgenthemes\ARVE\Admin;
|
|
4 |
use const \Nextgenthemes\ARVE\PRO_VERSION_REQUIRED;
|
5 |
|
6 |
use \Nextgenthemes\ARVE;
|
7 |
-
use \Nextgenthemes\ARVE\Common\Admin\NoticeFactory;
|
8 |
|
9 |
use function \Nextgenthemes\ARVE\Common\ver;
|
10 |
use function \Nextgenthemes\ARVE\Common\attr;
|
11 |
use function \Nextgenthemes\ARVE\Common\kses_basic;
|
12 |
use function \Nextgenthemes\ARVE\Common\enqueue_asset;
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
function action_admin_init_setup_messages() {
|
15 |
|
|
|
|
|
|
|
|
|
16 |
$pro_ver = false;
|
17 |
|
18 |
if ( defined( 'ARVE_PRO_VERSION' ) ) {
|
@@ -23,7 +41,7 @@ function action_admin_init_setup_messages() {
|
|
23 |
|
24 |
if ( $pro_ver && version_compare( PRO_VERSION_REQUIRED, $pro_ver, '>' ) ) {
|
25 |
$msg = sprintf(
|
26 |
-
// Translators: %1$s Version
|
27 |
__( 'Your ARVE Pro Addon is outdated, you need version %1$s or later. If you have setup your license <a href="%2$s">here</a> semi auto updates should work (Admin panel notice and auto install on confirmation). If not please <a href="%3$s">report it</a> and manually update as <a href="%4$s">described here.</a>', 'advanced-responsive-video-embedder' ),
|
28 |
ARVE\PRO_VERSION_REQUIRED,
|
29 |
esc_url( get_admin_url() . 'options-general.php?page=nextgenthemes' ),
|
@@ -31,40 +49,60 @@ function action_admin_init_setup_messages() {
|
|
31 |
'https://nextgenthemes.com/plugins/arve/documentation/installing-and-license-management/'
|
32 |
);
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
-
$update_msg = sprintf(
|
38 |
-
// Translators: %1$s Version
|
39 |
-
__( '<p>Your ARVE version was just updated. Please check <a href="%1$s">the new settings page</a> and verify/adjust your settings.</p><p>This was a <a href="%2$s"><strong>major update</strong></a>. If you experience any urgent breaking issues please <a href="%3$s">report them</a> and <a href="%4$s">downgrade</a> short term. I tried my best to have other beta testers over many months. Thanks to everyone who did test. But 9.0 has lots of code changed, I am afraid the update will trigger some issues we could not test for.</p>', 'advanced-responsive-video-embedder' ),
|
40 |
-
esc_url( get_admin_url() . 'options-general.php?page=nextgenthemes_arve' ),
|
41 |
-
'https://nextgenthemes.com/improvements-in-arve-9-0-and-arve-pro-5-0/',
|
42 |
-
'https://nextgenthemes.com/support/',
|
43 |
-
'https://nextgenthemes.com/plugins/arve/documentation/how-to-downgrade/'
|
44 |
-
);
|
45 |
-
|
46 |
-
new NoticeFactory( 'arve9', $update_msg, true );
|
47 |
-
|
48 |
if ( display_pro_ad() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
|
|
|
58 |
}
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
function display_pro_ad() {
|
62 |
|
63 |
$inst = (int) get_option( 'arve_install_date' );
|
64 |
|
65 |
-
if (
|
66 |
-
|
67 |
-
|
68 |
) {
|
69 |
return false;
|
70 |
}
|
@@ -87,7 +125,7 @@ function widget_text() {
|
|
87 |
printf( '<a href="%s">ARVE Pro Addon Features</a>:', 'https://nextgenthemes.com/plugins/arve-pro/' );
|
88 |
|
89 |
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_readfile
|
90 |
-
|
91 |
}
|
92 |
|
93 |
function add_dashboard_widget() {
|
@@ -264,7 +302,6 @@ function admin_enqueue_scripts() {
|
|
264 |
'src' => plugins_url( 'build/admin.js', ARVE\PLUGIN_FILE ),
|
265 |
'path' => ARVE\PLUGIN_DIR . '/build/admin.js',
|
266 |
'deps' => [ 'jquery' ],
|
267 |
-
'async' => false,
|
268 |
]
|
269 |
);
|
270 |
|
4 |
use const \Nextgenthemes\ARVE\PRO_VERSION_REQUIRED;
|
5 |
|
6 |
use \Nextgenthemes\ARVE;
|
|
|
7 |
|
8 |
use function \Nextgenthemes\ARVE\Common\ver;
|
9 |
use function \Nextgenthemes\ARVE\Common\attr;
|
10 |
use function \Nextgenthemes\ARVE\Common\kses_basic;
|
11 |
use function \Nextgenthemes\ARVE\Common\enqueue_asset;
|
12 |
|
13 |
+
const ALLOWED_HTML = [
|
14 |
+
'a' => [
|
15 |
+
'href' => [],
|
16 |
+
'target' => [],
|
17 |
+
'title' => [],
|
18 |
+
],
|
19 |
+
'p' => [],
|
20 |
+
'br' => [],
|
21 |
+
'em' => [],
|
22 |
+
'strong' => [],
|
23 |
+
'code' => [],
|
24 |
+
'ul' => [],
|
25 |
+
'li' => [],
|
26 |
+
];
|
27 |
+
|
28 |
function action_admin_init_setup_messages() {
|
29 |
|
30 |
+
if ( ! function_exists('dnh_register_notice') ) {
|
31 |
+
return;
|
32 |
+
}
|
33 |
+
|
34 |
$pro_ver = false;
|
35 |
|
36 |
if ( defined( 'ARVE_PRO_VERSION' ) ) {
|
41 |
|
42 |
if ( $pro_ver && version_compare( PRO_VERSION_REQUIRED, $pro_ver, '>' ) ) {
|
43 |
$msg = sprintf(
|
44 |
+
// Translators: %1$s Pro Version required
|
45 |
__( 'Your ARVE Pro Addon is outdated, you need version %1$s or later. If you have setup your license <a href="%2$s">here</a> semi auto updates should work (Admin panel notice and auto install on confirmation). If not please <a href="%3$s">report it</a> and manually update as <a href="%4$s">described here.</a>', 'advanced-responsive-video-embedder' ),
|
46 |
ARVE\PRO_VERSION_REQUIRED,
|
47 |
esc_url( get_admin_url() . 'options-general.php?page=nextgenthemes' ),
|
49 |
'https://nextgenthemes.com/plugins/arve/documentation/installing-and-license-management/'
|
50 |
);
|
51 |
|
52 |
+
dnh_register_notice(
|
53 |
+
'ngt-arve-outdated-pro-v' . PRO_VERSION_REQUIRED,
|
54 |
+
'notice-error',
|
55 |
+
wp_kses( $msg, ALLOWED_HTML ),
|
56 |
+
[
|
57 |
+
'cap' => 'update_plugins',
|
58 |
+
]
|
59 |
+
);
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
if ( display_pro_ad() ) {
|
63 |
+
dnh_register_notice(
|
64 |
+
'ngt-arve-addon-ad',
|
65 |
+
'notice-info',
|
66 |
+
wp_kses( ad_html(), ALLOWED_HTML ),
|
67 |
+
[
|
68 |
+
'cap' => 'install_plugins',
|
69 |
+
]
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
function ad_html() {
|
75 |
|
76 |
+
$html = esc_html__( 'Hi, this is Nico(las Jonas) the author of the ARVE Advanced Responsive Video Embedder plugin. If you are interrested in additional features and/or want to support the work I do on this plugin please consider buying the Pro Addon.', 'advanced-responsive-video-embedder' );
|
77 |
|
78 |
+
$html = "<p>$html</p><ul>";
|
79 |
|
80 |
+
$lis = [
|
81 |
+
__( '<strong>Disable links in embeds</strong><br>For example: Clicking on a title in a YouTube embed will not open a new popup/tab/window. <strong>Prevent providers from leading your visitors away from your site!</strong>', 'advanced-responsive-video-embedder' ),
|
82 |
+
__( '<strong>Lazyload mode</strong><br>Make your site load <strong>faster</strong> by loading only a image instead of the entire video player on pageload.', 'advanced-responsive-video-embedder' ),
|
83 |
+
__( '<strong>Lightbox</strong><br>Shows the Video in a Lightbox after clicking a preview image or link.', 'advanced-responsive-video-embedder' ),
|
84 |
+
sprintf(
|
85 |
+
// Translators: URLs
|
86 |
+
__( 'Expand on click and more, for a <strong><a href="%1$s">complete feature list</a></strong> please visit the <strong><a href="%1$s">official site</a></strong>.', 'advanced-responsive-video-embedder' ),
|
87 |
+
esc_url( 'https://nextgenthemes.com/plugins/arve-pro/' )
|
88 |
+
),
|
89 |
+
];
|
90 |
|
91 |
+
foreach ( $lis as $li ) {
|
92 |
+
$html .= "<li>$li</li>";
|
93 |
}
|
94 |
+
$html .= '</ul>';
|
95 |
+
|
96 |
+
return $html;
|
97 |
}
|
98 |
|
99 |
function display_pro_ad() {
|
100 |
|
101 |
$inst = (int) get_option( 'arve_install_date' );
|
102 |
|
103 |
+
if ( get_user_meta( get_current_user_id(), 'arve_dismiss_pro_notice' ) ||
|
104 |
+
is_plugin_active( 'arve-pro/arve-pro.php' ) ||
|
105 |
+
time() < strtotime( '+3 weeks', $inst )
|
106 |
) {
|
107 |
return false;
|
108 |
}
|
125 |
printf( '<a href="%s">ARVE Pro Addon Features</a>:', 'https://nextgenthemes.com/plugins/arve-pro/' );
|
126 |
|
127 |
// phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_readfile
|
128 |
+
echo wp_kses( ad_html(), ALLOWED_HTML );
|
129 |
}
|
130 |
|
131 |
function add_dashboard_widget() {
|
302 |
'src' => plugins_url( 'build/admin.js', ARVE\PLUGIN_FILE ),
|
303 |
'path' => ARVE\PLUGIN_DIR . '/build/admin.js',
|
304 |
'deps' => [ 'jquery' ],
|
|
|
305 |
]
|
306 |
);
|
307 |
|
php/Admin/partials/pro-ad.html
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<ul>
|
2 |
-
<li><strong>Disable links in embeds</strong>
|
3 |
-
For example: Clicking on a title in a YouTube embed will not open a new popup/tab/window. <strong>Prevent video hosts to lead your visitors away from your site!</strong></li>
|
4 |
-
<li><strong>Lazyload mode</strong><br />
|
5 |
-
Make your site load <strong>faster</strong> by loading only a image instead of the entire video player on pageload.</li>
|
6 |
-
<li><strong>Lazyload -> Lightbox</strong><br />
|
7 |
-
Shows the Video in a Lightbox after clicking a preview image</li>
|
8 |
-
<li><strong>Link -> Lightbox</strong><br />
|
9 |
-
Use simple links as triggers for lightboxed videos</li>
|
10 |
-
<li>Automatic or custom titles and thumbnails images</li>
|
11 |
-
<li>'Expand on click' feature</li>
|
12 |
-
<li>And more, for a <strong><a href="https://nextgenthemes.com/plugins/arve-pro/" rel="nofollow">complete feature list</a></strong> and purchase please visit the <strong><a href="https://nextgenthemes.com/plugins/arve-pro/" rel="nofollow">official site</a></strong></li>
|
13 |
-
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
php/Common/Admin/NoticeFactory.php
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
namespace Nextgenthemes\ARVE\Common\Admin;
|
3 |
-
|
4 |
-
use \Nextgenthemes\ARVE\Common;
|
5 |
-
|
6 |
-
class NoticeFactory {
|
7 |
-
|
8 |
-
public $slug;
|
9 |
-
public $notice;
|
10 |
-
public $notice_id;
|
11 |
-
public $dismiss_forever;
|
12 |
-
|
13 |
-
public function __construct( $slug, $notice, $dismiss_forever = true, $capabilities = 'activate_plugins' ) {
|
14 |
-
|
15 |
-
if ( ! current_user_can( $capabilities ) ) {
|
16 |
-
return;
|
17 |
-
}
|
18 |
-
|
19 |
-
$this->notice_id = "admin-notice-factory-$slug";
|
20 |
-
$this->notice = (string) $notice;
|
21 |
-
$this->dismiss_forever = (bool) $dismiss_forever;
|
22 |
-
|
23 |
-
if ( 'admin-notice-factory-arve_dismiss_pro_notice' === $this->notice_id ) {
|
24 |
-
$this->notice_id = 'arve_dismiss_pro_notice';
|
25 |
-
}
|
26 |
-
|
27 |
-
add_action( 'admin_notices', [ $this, 'action_admin_notices' ] );
|
28 |
-
add_action( "wp_ajax_{$this->notice_id}", [ $this, 'ajax_call' ] );
|
29 |
-
add_action( 'admin_enqueue_scripts', [ $this, 'assets' ] );
|
30 |
-
}
|
31 |
-
|
32 |
-
public function action_admin_notices() {
|
33 |
-
|
34 |
-
$user_id = get_current_user_id();
|
35 |
-
$user_meta = get_user_meta( $user_id, $this->notice_id );
|
36 |
-
|
37 |
-
if ( ($this->dismiss_forever && $user_meta) ||
|
38 |
-
get_transient($this->notice_id)
|
39 |
-
) {
|
40 |
-
return;
|
41 |
-
}
|
42 |
-
|
43 |
-
$allowed_notice_html = [
|
44 |
-
'a' => [
|
45 |
-
'href' => [],
|
46 |
-
'target' => [],
|
47 |
-
'title' => [],
|
48 |
-
],
|
49 |
-
'p' => [],
|
50 |
-
'br' => [],
|
51 |
-
'em' => [],
|
52 |
-
'strong' => [],
|
53 |
-
'code' => [],
|
54 |
-
];
|
55 |
-
|
56 |
-
printf(
|
57 |
-
'<div class="notice is-dismissible updated" data-nextgenthemes-notice-id="%s">%s</div>',
|
58 |
-
esc_attr( $this->notice_id ),
|
59 |
-
wp_kses( $this->notice, $allowed_notice_html )
|
60 |
-
);
|
61 |
-
}
|
62 |
-
|
63 |
-
public function assets() {
|
64 |
-
|
65 |
-
Common\enqueue_asset(
|
66 |
-
[
|
67 |
-
'handle' => 'nextgenthemes-notice-ajax',
|
68 |
-
'src' => Common\plugin_or_theme_src( 'build/common/notice-ajax.js' ),
|
69 |
-
'path' => dirname( dirname( dirname( __DIR__ ) ) ) . '/build/common/notice-ajax.js',
|
70 |
-
'footer' => false,
|
71 |
-
]
|
72 |
-
);
|
73 |
-
}
|
74 |
-
|
75 |
-
public function ajax_call() {
|
76 |
-
|
77 |
-
$user_id = get_current_user_id();
|
78 |
-
|
79 |
-
if ( $this->dismiss_forever ) {
|
80 |
-
update_user_meta( $user_id, $this->notice_id, 'ngt-notice-dismissed' );
|
81 |
-
} else {
|
82 |
-
set_transient( $this->notice_id, true, HOUR_IN_SECONDS );
|
83 |
-
}
|
84 |
-
|
85 |
-
wp_die();
|
86 |
-
}
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
php/Common/Admin/functions-notices.php
CHANGED
@@ -6,6 +6,10 @@ use \Nextgenthemes\ARVE\Common;
|
|
6 |
// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain
|
7 |
function activation_notices() {
|
8 |
|
|
|
|
|
|
|
|
|
9 |
$products = Common\get_products();
|
10 |
|
11 |
foreach ( $products as $key => $value ) :
|
@@ -17,7 +21,15 @@ function activation_notices() {
|
|
17 |
$value['name'],
|
18 |
get_admin_url() . 'options-general.php?page=nextgenthemes'
|
19 |
);
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
endforeach;
|
23 |
}
|
6 |
// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralDomain
|
7 |
function activation_notices() {
|
8 |
|
9 |
+
if ( ! function_exists('dnh_register_notice') ) {
|
10 |
+
return;
|
11 |
+
}
|
12 |
+
|
13 |
$products = Common\get_products();
|
14 |
|
15 |
foreach ( $products as $key => $value ) :
|
21 |
$value['name'],
|
22 |
get_admin_url() . 'options-general.php?page=nextgenthemes'
|
23 |
);
|
24 |
+
|
25 |
+
dnh_register_notice(
|
26 |
+
"ngt-$key-activation-notice",
|
27 |
+
'notice-info',
|
28 |
+
'<p>' . wp_kses( $msg, [ 'a' => [ 'href' ] ] ) . '</p>',
|
29 |
+
[
|
30 |
+
'cap' => 'change_options',
|
31 |
+
]
|
32 |
+
);
|
33 |
}
|
34 |
endforeach;
|
35 |
}
|
php/Common/Admin/partials/debug-info.php
CHANGED
@@ -17,6 +17,9 @@ REST URL: <?= esc_html( get_rest_url( null, $this->rest_namespace ) .
|
|
17 |
|
18 |
<?php print_network_active_plugins(); ?>
|
19 |
|
20 |
-
ARVE
|
21 |
<?= wp_kses( get_var_dump( get_option( 'nextgenthemes_arve' ) ), [] ); ?>
|
|
|
|
|
|
|
22 |
</textarea>
|
17 |
|
18 |
<?php print_network_active_plugins(); ?>
|
19 |
|
20 |
+
ARVE Options:
|
21 |
<?= wp_kses( get_var_dump( get_option( 'nextgenthemes_arve' ) ), [] ); ?>
|
22 |
+
|
23 |
+
Dismissed Notices:
|
24 |
+
<?= wp_kses( get_var_dump( get_user_meta( get_current_user_id(), 'dnh_dismissed_notices' ) ), [] ); ?>
|
25 |
</textarea>
|
php/Common/Settings.php
CHANGED
@@ -146,7 +146,6 @@ class Settings {
|
|
146 |
'src' => plugin_or_theme_src( 'build/common/settings.js' ),
|
147 |
'path' => dirname( dirname( __DIR__ ) ) . '/build/common/settings.js',
|
148 |
'deps' => [ 'jquery' ],
|
149 |
-
'async' => false,
|
150 |
'inline_script' => "var {$this->slugged_namespace} = " . \wp_json_encode( $settings_data ) . ';',
|
151 |
'inline_script_pos' => 'before',
|
152 |
]
|
146 |
'src' => plugin_or_theme_src( 'build/common/settings.js' ),
|
147 |
'path' => dirname( dirname( __DIR__ ) ) . '/build/common/settings.js',
|
148 |
'deps' => [ 'jquery' ],
|
|
|
149 |
'inline_script' => "var {$this->slugged_namespace} = " . \wp_json_encode( $settings_data ) . ';',
|
150 |
'inline_script_pos' => 'before',
|
151 |
]
|
php/Common/functions-assets.php
CHANGED
@@ -49,14 +49,14 @@ function asset( array $args ) {
|
|
49 |
|
50 |
$defaults = [
|
51 |
'path' => '',
|
52 |
-
'async' =>
|
53 |
'cdn_src' => '',
|
54 |
-
'defer' =>
|
55 |
'deps' => [],
|
56 |
'enqueue' => false,
|
57 |
'enqueue_hooks' => [],
|
58 |
'handle' => '',
|
59 |
-
'in_footer' =>
|
60 |
'integrity' => '',
|
61 |
'media' => 'all',
|
62 |
'src' => '',
|
49 |
|
50 |
$defaults = [
|
51 |
'path' => '',
|
52 |
+
'async' => false,
|
53 |
'cdn_src' => '',
|
54 |
+
'defer' => true,
|
55 |
'deps' => [],
|
56 |
'enqueue' => false,
|
57 |
'enqueue_hooks' => [],
|
58 |
'handle' => '',
|
59 |
+
'in_footer' => false,
|
60 |
'integrity' => '',
|
61 |
'media' => 'all',
|
62 |
'src' => '',
|
php/Common/init.php
CHANGED
@@ -18,7 +18,6 @@ require_once __DIR__ . '/functions-assets.php';
|
|
18 |
require_once __DIR__ . '/functions-remote-get.php';
|
19 |
require_once __DIR__ . '/Admin/EDD/PluginUpdater.php';
|
20 |
require_once __DIR__ . '/Admin/EDD/ThemeUpdater.php';
|
21 |
-
require_once __DIR__ . '/Admin/NoticeFactory.php';
|
22 |
require_once __DIR__ . '/Admin/functions-licensing.php';
|
23 |
require_once __DIR__ . '/Admin/functions-settings.php';
|
24 |
require_once __DIR__ . '/Admin/functions-notices.php';
|
18 |
require_once __DIR__ . '/functions-remote-get.php';
|
19 |
require_once __DIR__ . '/Admin/EDD/PluginUpdater.php';
|
20 |
require_once __DIR__ . '/Admin/EDD/ThemeUpdater.php';
|
|
|
21 |
require_once __DIR__ . '/Admin/functions-licensing.php';
|
22 |
require_once __DIR__ . '/Admin/functions-settings.php';
|
23 |
require_once __DIR__ . '/Admin/functions-notices.php';
|
php/ShortcodeArgs.php
CHANGED
@@ -273,9 +273,9 @@ class ShortcodeArgs {
|
|
273 |
);
|
274 |
}
|
275 |
|
276 |
-
$options = options();
|
277 |
$properties = get_host_properties();
|
278 |
$input_provider = $a['provider'];
|
|
|
279 |
|
280 |
foreach ( $properties as $host_id => $host ) :
|
281 |
|
@@ -283,7 +283,7 @@ class ShortcodeArgs {
|
|
283 |
continue;
|
284 |
}
|
285 |
|
286 |
-
$preg_match = preg_match( $host['regex'], $
|
287 |
|
288 |
if ( 1 !== $preg_match ) {
|
289 |
continue;
|
@@ -308,7 +308,6 @@ class ShortcodeArgs {
|
|
308 |
if ( ! $a['provider'] ) {
|
309 |
$a['provider'] = 'iframe';
|
310 |
$a['src'] = $a['src'] ? $a['src'] : $a['url'];
|
311 |
-
$a['id'] = $a['src'];
|
312 |
}
|
313 |
|
314 |
return $a;
|
@@ -340,9 +339,14 @@ class ShortcodeArgs {
|
|
340 |
private function build_iframe_src( array $a ) {
|
341 |
|
342 |
if ( ! $a['provider'] || ! $a['id'] ) {
|
343 |
-
|
344 |
-
|
345 |
-
|
|
|
|
|
|
|
|
|
|
|
346 |
}
|
347 |
|
348 |
$options = options();
|
@@ -404,7 +408,7 @@ class ShortcodeArgs {
|
|
404 |
|
405 |
private function compare_oembed_src_with_generated_src( $a ) {
|
406 |
|
407 |
-
if ( ! $a['src'] ) {
|
408 |
return;
|
409 |
}
|
410 |
|
273 |
);
|
274 |
}
|
275 |
|
|
|
276 |
$properties = get_host_properties();
|
277 |
$input_provider = $a['provider'];
|
278 |
+
$check_url = $a['url'] ? $a['url'] : $a['src'];
|
279 |
|
280 |
foreach ( $properties as $host_id => $host ) :
|
281 |
|
283 |
continue;
|
284 |
}
|
285 |
|
286 |
+
$preg_match = preg_match( $host['regex'], $check_url, $matches );
|
287 |
|
288 |
if ( 1 !== $preg_match ) {
|
289 |
continue;
|
308 |
if ( ! $a['provider'] ) {
|
309 |
$a['provider'] = 'iframe';
|
310 |
$a['src'] = $a['src'] ? $a['src'] : $a['url'];
|
|
|
311 |
}
|
312 |
|
313 |
return $a;
|
339 |
private function build_iframe_src( array $a ) {
|
340 |
|
341 |
if ( ! $a['provider'] || ! $a['id'] ) {
|
342 |
+
|
343 |
+
if ( $a['src'] ) {
|
344 |
+
return false;
|
345 |
+
} else {
|
346 |
+
throw new \Exception(
|
347 |
+
__( 'Need Provider and ID to build iframe src.', 'advanced-responsive-video-embedder' )
|
348 |
+
);
|
349 |
+
}
|
350 |
}
|
351 |
|
352 |
$options = options();
|
408 |
|
409 |
private function compare_oembed_src_with_generated_src( $a ) {
|
410 |
|
411 |
+
if ( ! $a['src'] || ! $a['src_gen'] ) {
|
412 |
return;
|
413 |
}
|
414 |
|
php/functions-assets.php
CHANGED
@@ -17,12 +17,14 @@ function register_assets() {
|
|
17 |
'handle' => 'arve-main',
|
18 |
'src' => plugins_url( 'build/main.js', PLUGIN_FILE ),
|
19 |
'path' => PLUGIN_DIR . '/build/main.js',
|
|
|
|
|
20 |
]
|
21 |
);
|
22 |
|
23 |
// phpcs:disable WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
24 |
-
wp_register_script( 'arve', null, [ 'arve-main' ], null,
|
25 |
-
wp_register_style( 'arve', null, [ 'arve-main' ], null,
|
26 |
// phpcs:enable WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
27 |
|
28 |
if ( function_exists( 'register_block_type' ) ) :
|
@@ -54,8 +56,6 @@ function register_assets() {
|
|
54 |
'src' => plugins_url( 'build/block.js', PLUGIN_FILE ),
|
55 |
'path' => PLUGIN_DIR . '/build/block.js',
|
56 |
'deps' => [ 'arve' ],
|
57 |
-
'footer' => false,
|
58 |
-
'async' => false,
|
59 |
]
|
60 |
);
|
61 |
wp_localize_script( 'arve-block', 'ARVEsettings', $sc_settings );
|
@@ -79,6 +79,7 @@ function action_wp_enqueue_scripts() {
|
|
79 |
$options = options();
|
80 |
|
81 |
wp_enqueue_style( 'arve' );
|
|
|
82 |
|
83 |
if ( $options['always_enqueue_assets'] ) {
|
84 |
wp_enqueue_script( 'arve' );
|
17 |
'handle' => 'arve-main',
|
18 |
'src' => plugins_url( 'build/main.js', PLUGIN_FILE ),
|
19 |
'path' => PLUGIN_DIR . '/build/main.js',
|
20 |
+
'async' => true,
|
21 |
+
'defer' => false,
|
22 |
]
|
23 |
);
|
24 |
|
25 |
// phpcs:disable WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
26 |
+
wp_register_script( 'arve', null, [ 'arve-main' ], null, false );
|
27 |
+
wp_register_style( 'arve', null, [ 'arve-main' ], null, false );
|
28 |
// phpcs:enable WordPress.WP.EnqueuedResourceParameters.MissingVersion
|
29 |
|
30 |
if ( function_exists( 'register_block_type' ) ) :
|
56 |
'src' => plugins_url( 'build/block.js', PLUGIN_FILE ),
|
57 |
'path' => PLUGIN_DIR . '/build/block.js',
|
58 |
'deps' => [ 'arve' ],
|
|
|
|
|
59 |
]
|
60 |
);
|
61 |
wp_localize_script( 'arve-block', 'ARVEsettings', $sc_settings );
|
79 |
$options = options();
|
80 |
|
81 |
wp_enqueue_style( 'arve' );
|
82 |
+
wp_enqueue_script( 'arve-main' );
|
83 |
|
84 |
if ( $options['always_enqueue_assets'] ) {
|
85 |
wp_enqueue_script( 'arve' );
|
php/functions-host-properties.php
CHANGED
@@ -659,18 +659,6 @@ function get_host_properties() {
|
|
659 |
'name' => 'mp4 or webm video files',
|
660 |
'aspect_ratio' => false,
|
661 |
],
|
662 |
-
'iframe' => [
|
663 |
-
'name' => 'ARVE general iframe embed',
|
664 |
-
'embed_url' => '%s',
|
665 |
-
'default_params' => '',
|
666 |
-
'auto_thumbnail' => false,
|
667 |
-
'tests' => [
|
668 |
-
[
|
669 |
-
'url' => 'https://example.com/',
|
670 |
-
'id' => 'https://example.com/',
|
671 |
-
],
|
672 |
-
],
|
673 |
-
],
|
674 |
'googledrive' => [
|
675 |
'name' => 'Google Drive',
|
676 |
'regex' => '#https?://drive\.google\.com/file/d/(?<id>[^\s/]+)#i',
|
@@ -690,6 +678,36 @@ function get_host_properties() {
|
|
690 |
'name' => 'IMDB',
|
691 |
'requires_src' => true,
|
692 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
];
|
694 |
|
695 |
return $properties;
|
659 |
'name' => 'mp4 or webm video files',
|
660 |
'aspect_ratio' => false,
|
661 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
662 |
'googledrive' => [
|
663 |
'name' => 'Google Drive',
|
664 |
'regex' => '#https?://drive\.google\.com/file/d/(?<id>[^\s/]+)#i',
|
678 |
'name' => 'IMDB',
|
679 |
'requires_src' => true,
|
680 |
],
|
681 |
+
'rumble' => [
|
682 |
+
'name' => 'rumble.com',
|
683 |
+
'regex' => '#https://rumble\.com/(embed/)?(?<id>[^-/]+)#i',
|
684 |
+
'embed_url' => 'https://rumble.com/embed/%s/',
|
685 |
+
'default_params' => '',
|
686 |
+
'auto_thumbnail' => true,
|
687 |
+
'auto_title' => true,
|
688 |
+
'tests' => [
|
689 |
+
[
|
690 |
+
'url' => 'https://rumble.com/vd6thp-gigantic-galapagos-tortoise-casually-strolls-through-a-restaurant.html',
|
691 |
+
'id' => 'vd6thp',
|
692 |
+
],
|
693 |
+
[
|
694 |
+
'url' => 'https://rumble.com/embed/vd6thp/?foo=bar',
|
695 |
+
'id' => 'vd6thp',
|
696 |
+
],
|
697 |
+
],
|
698 |
+
],
|
699 |
+
'iframe' => [
|
700 |
+
'name' => 'ARVE general iframe embed',
|
701 |
+
'embed_url' => '%s',
|
702 |
+
'default_params' => '',
|
703 |
+
'auto_thumbnail' => false,
|
704 |
+
'tests' => [
|
705 |
+
[
|
706 |
+
'url' => 'https://example.com/',
|
707 |
+
'id' => 'https://example.com/',
|
708 |
+
],
|
709 |
+
],
|
710 |
+
],
|
711 |
];
|
712 |
|
713 |
return $properties;
|
php/functions-oembed.php
CHANGED
@@ -29,8 +29,7 @@ function oembed2args( $data, $url ) {
|
|
29 |
return false;
|
30 |
}
|
31 |
|
32 |
-
$provider =
|
33 |
-
$provider = str_replace( 'wistia, inc.', 'wistia', $provider );
|
34 |
|
35 |
if ( 'facebook' === $provider ) {
|
36 |
preg_match( '/class="fb-video" data-href="([^"]+)"/', $data->html, $matches );
|
@@ -58,6 +57,14 @@ function oembed2args( $data, $url ) {
|
|
58 |
return apply_filters( 'nextgenthemes/arve/oembed2args', $a );
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
// needed for private videos
|
62 |
function vimeo_referer( $args, $url ) {
|
63 |
|
29 |
return false;
|
30 |
}
|
31 |
|
32 |
+
$provider = provider_name( $data->provider_name );
|
|
|
33 |
|
34 |
if ( 'facebook' === $provider ) {
|
35 |
preg_match( '/class="fb-video" data-href="([^"]+)"/', $data->html, $matches );
|
57 |
return apply_filters( 'nextgenthemes/arve/oembed2args', $a );
|
58 |
}
|
59 |
|
60 |
+
function provider_name($provider) {
|
61 |
+
$provider = preg_replace( '/[^a-z0-9]/', '', strtolower($provider) );
|
62 |
+
$provider = str_replace( 'wistiainc', 'wistia', $provider );
|
63 |
+
$provider = str_replace( 'rumblecom', 'rumble', $provider );
|
64 |
+
|
65 |
+
return $provider;
|
66 |
+
}
|
67 |
+
|
68 |
// needed for private videos
|
69 |
function vimeo_referer( $args, $url ) {
|
70 |
|
php/functions-shortcodes.php
CHANGED
@@ -33,50 +33,6 @@ function shortcode( $a, $content = null ) {
|
|
33 |
return build_video( $a, $content );
|
34 |
}
|
35 |
|
36 |
-
function test_shortcode( $atts = null, $content = null ) {
|
37 |
-
|
38 |
-
$html = '';
|
39 |
-
$providers = get_host_properties();
|
40 |
-
$get_provider = sanitize_text_field( wp_unslash( empty( $_GET['arve-provider-test'] ) ? '' : $_GET['arve-provider-test'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
41 |
-
|
42 |
-
if ( $get_provider ) {
|
43 |
-
|
44 |
-
if ( empty( $providers[ $get_provider ]['tests'] ) ) {
|
45 |
-
$html .= 'no tests for ' . $get_provider;
|
46 |
-
} else {
|
47 |
-
$html .= basic_tests( $providers[ $get_provider ]['tests'] );
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
$html .= '<ul>';
|
52 |
-
foreach ( $providers as $provider => $v ) {
|
53 |
-
|
54 |
-
$url = add_query_arg( $GLOBALS['wp']->query_vars, home_url( $GLOBALS['wp']->request ) );
|
55 |
-
$url = add_query_arg( 'arve-provider-test', $provider, $url );
|
56 |
-
$html .= sprintf( '<li><a href="%s">Test %s</a></li>', $url, $provider );
|
57 |
-
}
|
58 |
-
$html .= '</ul>';
|
59 |
-
|
60 |
-
return $html;
|
61 |
-
}
|
62 |
-
|
63 |
-
function basic_tests( $tests ) {
|
64 |
-
|
65 |
-
$html = '';
|
66 |
-
$modes = [ 'normal', 'lazyload', 'lightbox' ];
|
67 |
-
|
68 |
-
foreach ( $tests as $key => $value ) {
|
69 |
-
$sc = sprintf( '[arve url="%s" mode="lazyload" maxwidth="300" /]', $value['url'], $modes[ array_rand( $modes ) ] );
|
70 |
-
$html .= do_shortcode( $sc );
|
71 |
-
}
|
72 |
-
|
73 |
-
$html .= "<code>[$sc]</code><br>";
|
74 |
-
$html .= do_shortcode( $sc );
|
75 |
-
$html .= '<br>';
|
76 |
-
|
77 |
-
return $html;
|
78 |
-
}
|
79 |
-
|
80 |
function error( $msg, $code = '' ) {
|
81 |
|
82 |
return sprintf(
|
@@ -182,7 +138,6 @@ function create_shortcodes() {
|
|
182 |
}
|
183 |
|
184 |
add_shortcode( 'arve', __NAMESPACE__ . '\shortcode' );
|
185 |
-
add_shortcode( 'arve_test', __NAMESPACE__ . '\test_shortcode' );
|
186 |
}
|
187 |
|
188 |
// TODO sometimes $attr is string, investigate when and what it is exacly
|
33 |
return build_video( $a, $content );
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
function error( $msg, $code = '' ) {
|
37 |
|
38 |
return sprintf(
|
138 |
}
|
139 |
|
140 |
add_shortcode( 'arve', __NAMESPACE__ . '\shortcode' );
|
|
|
141 |
}
|
142 |
|
143 |
// TODO sometimes $attr is string, investigate when and what it is exacly
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: nico23
|
3 |
Donate link: https://nextgenthemes.com/donate/
|
4 |
Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embedder, iframe, lightweight, simplicity, shortcodes
|
5 |
-
Requires at least: 4.
|
6 |
Tested up to: 5.6
|
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 |
|
@@ -55,7 +55,7 @@ It is very likely the one and only plugin you will ever need to handle video emb
|
|
55 |
#### Supported Providers ####
|
56 |
|
57 |
[All providers with iframe embed codes](https://nextgenthemes.com/plugins/arve/documentation/#general-iframe-embedding)
|
58 |
-
Alugha, Archive.org, Bitchute, Break, Brightcove, Comedy Central, Dailymotion, Dailymotion Playlist, DTube, Facebook, Funny or Die, IGN, Kickstarter, LiveLeak, Livestream.com, kla.tv, Metacafe, myspace, Snotr, Spike, TED Talks, Twitch, Ustream, RuTube.ru, Viddler, vidspot.net, Vimeo, VK, vzaar, Wistia, XTube, Yahoo, Youku, YouTube, YouTube Playlist, mp4 or webm video files,
|
59 |
### Reviews ###
|
60 |
|
61 |
#### ★ ★ ★ ★ ★ Great plugin, great support ####
|
@@ -172,6 +172,12 @@ Please read the [official documentation](https://wordpress.org/support/article/m
|
|
172 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
173 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/random-video/#changelog)
|
174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
### 2021-01-25 9.3.5 ###
|
176 |
|
177 |
* Fix: Avoid passing `null` to `str_contains`.
|
2 |
Contributors: nico23
|
3 |
Donate link: https://nextgenthemes.com/donate/
|
4 |
Tags: YouTube, Vimeo, lazyload, thumbnail, video, responsive, embeds, video-embedder, iframe, lightweight, simplicity, shortcodes
|
5 |
+
Requires at least: 4.9.16
|
6 |
Tested up to: 5.6
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 9.4.1
|
9 |
License: GPL-3.0
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
55 |
#### Supported Providers ####
|
56 |
|
57 |
[All providers with iframe embed codes](https://nextgenthemes.com/plugins/arve/documentation/#general-iframe-embedding)
|
58 |
+
Alugha, Archive.org, Bitchute, Break, Brightcove, Comedy Central, Dailymotion, Dailymotion Playlist, DTube, Facebook, Funny or Die, IGN, Kickstarter, LiveLeak, Livestream.com, kla.tv, Metacafe, myspace, Snotr, Spike, TED Talks, Twitch, Ustream, RuTube.ru, Viddler, vidspot.net, Vimeo, VK, vzaar, Wistia, XTube, Yahoo, Youku, YouTube, YouTube Playlist, mp4 or webm video files, Google Drive, ooyala, IMDB, rumble.com, ARVE general iframe embed
|
59 |
### Reviews ###
|
60 |
|
61 |
#### ★ ★ ★ ★ ★ Great plugin, great support ####
|
172 |
* [ARVE Pro changelog](https://nextgenthemes.com/plugins/arve-pro/#changelog)
|
173 |
* [ARVE Random Videos changelog](https://nextgenthemes.com/plugins/random-video/#changelog)
|
174 |
|
175 |
+
### 2021-01-28 9.4.1 ###
|
176 |
+
|
177 |
+
* Fix: (hopefully) Non dismissible admin notices. Also removed the notice that came with 9.0-beta completely.
|
178 |
+
* Fix: rumble.com and other providers.
|
179 |
+
* Improved: The __tiny__ JavaScript of ARVE is now loaded in the `<head>` with `<script async src=` this will deal with edge cases when styles would get applied late.
|
180 |
+
|
181 |
### 2021-01-25 9.3.5 ###
|
182 |
|
183 |
* Fix: Avoid passing `null` to `str_contains`.
|