PluginProbe
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance / 2.1.0
WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance v2.1.0
4.6.1 4.6.0 4.5.5 4.5.4 4.5.3 4.5.2 3.2.20 3.2.21 3.2.22 3.2.3 3.2.5 3.2.6 3.2.7 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.7.0 3.7.1 3.8.0 All 110 releases
wp-optimize / includes / updraftcentral.php

updraftcentral.php in WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance 2.1.0, at includes/updraftcentral.php

34 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('WPO_PLUGIN_MAIN_PATH')) die('No direct access allowed');
4
5 // This file is the bootstrapper for UpdraftCentral integration: i.e. it registers what is necessary to deal with commands in the wpoptimize namespace.
6
7 class WP_Optimize_UpdraftCentral {
8
9 public function __construct() {
10 add_action('updraftplus_remotecontrol_command_classes', array($this, 'updraftplus_remotecontrol_command_classes'));
11 add_action('updraftcentral_command_class_wanted', array($this, 'updraftcentral_command_class_wanted'));
12 }
13
14 // Register our class
15 public function updraftplus_remotecontrol_command_classes($command_classes) {
16 if (is_array($command_classes)) $command_classes['wpoptimize'] = 'UpdraftCentral_WP_Optimize_Commands';
17 return $command_classes;
18 }
19
20 // Load the class when required
21 public function updraftcentral_command_class_wanted($command_php_class) {
22 if ('UpdraftCentral_WP_Optimize_Commands' == $command_php_class) {
23 // This fragment is only needed for compatibility with UD < 1.12.30 - thenceforth, the class can be assumed to exist
24 if (!class_exists('UpdraftCentral_Commands')) {
25 require_once(apply_filters('updraftcentral_command_base_class_at', UPDRAFTPLUS_DIR.'/central/commands.php'));
26 }
27 require_once(WPO_PLUGIN_MAIN_PATH.'includes/class-updraftcentral-wp-optimize-commands.php');
28 }
29 }
30
31 }
32
33 new WP_Optimize_UpdraftCentral();
34