PluginProbe
WEDOS | Protection & Cache Performance / 2.2.1
WEDOS | Protection & Cache Performance v2.2.1
2.2.0 2.2.1 2.1.1 2.0.22 2.1.0 2.0.21 2.0.20 2.0.19 2.0.18 2.0.17 2.0.16 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.2.0 All 40 releases
wgpwpp / wgpwpp.php

wgpwpp.php in WEDOS | Protection & Cache Performance 2.2.1, at wgpwpp.php

51 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: WEDOS | Protection & Cache Performance
4 * Plugin URI: https://www.wedos.com/protection/#wgp-plugin
5 * Description: Activate and use the WEDOS Protection service. WEDOS Protection brings global security for your WordPress website, ensures low latency and minimal loading time.
6 * Version: 2.2.1
7 * Requires at least: 6.7
8 * Requires PHP: 8.2
9 * Author: WEDOS
10 * Author URI: https://www.wedos.com
11 * License: GPL-2.0+
12 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
13 * Text Domain: wgpwpp
14 * Domain Path: /languages
15 */
16
17 if (!defined('ABSPATH')) exit;
18
19 if (!defined('WEDOS_PP_PATH')) {
20 define('WEDOS_PP_PATH', plugin_dir_path(__FILE__));
21 }
22
23 if (!defined('WEDOS_PP_URL')) {
24 define('WEDOS_PP_URL', plugin_dir_url(__FILE__));
25 }
26
27 if (!defined('WEDOS_PP_VERSION')) {
28 define('WEDOS_PP_VERSION', '2.2.1');
29 }
30
31 require_once WEDOS_PP_PATH . 'includes/bootstrap.php';
32
33 \WedosPP\Core\Plugin::init();
34
35 // CDN engine must hook into plugins_loaded so filters are registered
36 // before wp_enqueue_scripts fires on the frontend.
37 add_action( 'plugins_loaded', [ '\WedosPP\Cdn\Engine', 'boot' ], 5 );
38 add_action( 'plugins_loaded', [ '\WedosPP\Cdn\PluginThemeRewriter', 'boot' ], 6 );
39
40 register_activation_hook(__FILE__, function () {
41 try {
42 $s = \WedosPP\Core\Settings::get();
43 if ( method_exists( '\WedosPP\Core\Settings', 'ensure_verification_file' ) ) {
44 \WedosPP\Core\Settings::ensure_verification_file($s);
45 }
46 \WedosPP\Core\Settings::save($s);
47 } catch ( \Throwable $e ) {
48 // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
49 error_log( 'WEDOS activation error: ' . $e->getMessage() );
50 }
51 });