PluginProbe
Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick … / trunk
Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick … vtrunk
10.8.9 10.9.0 10.9.4 10.8.6 9.5.1-beta8 9.5.10 9.5.11 9.5.12 9.5.14 9.5.2-beta1 9.5.2-beta3 9.5.3-beta1 9.5.4-beta1 9.5.5 9.5.6 9.5.7 9.5.8 9.6.2 9.7.0 9.7.1 9.7.10 9.7.11 9.7.14 9.7.15 9.7.16 All 209 releases
advanced-responsive-video-embedder / advanced-responsive-video-embedder.php

advanced-responsive-video-embedder.php in Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick … trunk, at advanced-responsive-video-embedder.php

102 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Advanced Responsive Video Embedder for Rumble, Odysee, YouTube, Vimeo, Kick ...
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: 10.9.4
7 * Requires PHP: 7.4
8 * Requires at least: 6.6
9 * Author: Nicolas Jonas
10 * Author URI: https://nextgenthemes.com
11 * License: GPL-3.0
12 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
13 * Text Domain: advanced-responsive-video-embedder
14 *
15 * @package Nextgenthemes/ARVE
16 * @author Nicolas Jonas
17 * @license GPL 3.0
18 * @link https://nextgenthemes.com
19 */
20
21 declare(strict_types = 1);
22
23 namespace Nextgenthemes\ARVE;
24
25 const VERSION = '10.9.4';
26 const PRO_VERSION_REQUIRED = '7.1.4';
27 const PRIVACY_VERSION_REQUIRED = '1.1.5';
28 const RANDOMVIDEO_VERSION_REQUIRED = '2.1.8';
29 const STICKYVIDEOS_VERSION_REQUIRED = '2.0.2';
30 const AMP_VERSION_REQUIRED = '2.2.1';
31 const NUM_TRACKS = 3;
32 const PLUGIN_FILE = __FILE__;
33 const PLUGIN_DIR = __DIR__;
34 const VIDEO_FILE_EXTENSIONS = array( 'av1mp4', 'mp4', 'm4v', 'webm', 'ogv' );
35 const DEFAULT_MAXWIDTH = 900;
36 const OEMBED_HTML_PRIORITY = -5;
37 const VIEW_SCRIPT_HANDLES = array( 'arve', 'arve-pro', 'arve-sticky-videos', 'arve-random-video' );
38 const ADDONS = array(
39 'arve-random-video' => 'RandomVideo',
40 'arve-pro' => 'Pro',
41 'arve-privacy' => 'Privacy',
42 'arve-sticky-videos' => 'StickyVideos',
43 'arve-amp' => 'AMP',
44 );
45 // For error messages and stuff on the admin screens.
46 const ALLOWED_HTML = array(
47 'h1' => array( 'class' => true ),
48 'h2' => array( 'class' => true ),
49 'h3' => array( 'class' => true ),
50 'h4' => array( 'class' => true ),
51 'h5' => array( 'class' => true ),
52 'h6' => array( 'class' => true ),
53 'a' => array(
54 'href' => true,
55 'target' => true,
56 'title' => true,
57 ),
58 'abbr' => array( 'title' => true ),
59 'small' => array(),
60 'p' => array( 'class' => true ),
61 'br' => array(),
62 'em' => array(),
63 'strong' => array(),
64 'code' => array( 'class' => true ),
65 'ol' => array( 'class' => true ),
66 'ul' => array( 'class' => true ),
67 'li' => array( 'class' => true ),
68 'pre' => array( 'class' => true ),
69 'div' => array( 'class' => true ),
70 );
71
72 require_once __DIR__ . '/php/providers.php';
73
74 if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) { // @phpstan-ignore-line
75 return;
76 }
77
78 if ( ! defined( 'ABSPATH' ) ) {
79 return; // no exit for use in build script
80 }
81
82 $autoloader = __DIR__ . '/vendor/autoload_packages.php';
83 if ( file_exists( $autoloader ) ) {
84 require_once $autoloader;
85 }
86
87 require_once __DIR__ . '/php/init.php';
88
89 if ( defined( 'WP_CLI' ) && WP_CLI ) { // @phpstan-ignore-line
90 \WP_CLI::add_command( 'arve', 'Nextgenthemes\ARVE\CLI' );
91 }
92
93 register_uninstall_hook( PLUGIN_FILE, __NAMESPACE__ . '\uninstall' );
94 function uninstall(): void {
95
96 global $wpdb;
97
98 if ( version_compare( $wpdb->db_version(), '8.0', '>=' ) ) {
99 $wpdb->query( "UPDATE {$wpdb->postmeta} SET meta_value = REGEXP_REPLACE( meta_value, '<template[^>]+arve_cachetime[^>]+></template>', '' )" );
100 }
101 }
102