MPSUM_Admin.php
7 years ago
MPSUM_Admin_Advanced.php
7 years ago
MPSUM_Admin_Advanced_Preview.php
7 years ago
MPSUM_Admin_Ajax.php
7 years ago
MPSUM_Admin_Bar.php
7 years ago
MPSUM_Admin_Core.php
7 years ago
MPSUM_Admin_Dashboard.php
7 years ago
MPSUM_Admin_Help.php
7 years ago
MPSUM_Admin_Logs.php
7 years ago
MPSUM_Admin_Plugins.php
7 years ago
MPSUM_Admin_Screen_Options.php
7 years ago
MPSUM_Admin_Themes.php
7 years ago
MPSUM_Advanced_Premium.php
7 years ago
MPSUM_Check_Plugin_Install_Status.php
7 years ago
MPSUM_Check_Theme_Install_Status.php
7 years ago
MPSUM_Commands.php
7 years ago
MPSUM_Disable_Updates.php
7 years ago
MPSUM_Disable_Updates_All.php
7 years ago
MPSUM_Disable_Updates_Plugins.php
7 years ago
MPSUM_Disable_Updates_Themes.php
7 years ago
MPSUM_Disable_Updates_Translations.php
7 years ago
MPSUM_Disable_Updates_WordPress.php
7 years ago
MPSUM_Exclude_Users.php
7 years ago
MPSUM_Force_Updates.php
7 years ago
MPSUM_List_Table.php
7 years ago
MPSUM_Logs.php
7 years ago
MPSUM_Logs_List_Table.php
7 years ago
MPSUM_Plugins_List_Table.php
7 years ago
MPSUM_Reset_Options.php
7 years ago
MPSUM_Themes_List_Table.php
7 years ago
MPSUM_UpdraftCentral.php
7 years ago
MPSUM_UpdraftCentral_EUM_Commands.php
7 years ago
MPSUM_Utils.php
7 years ago
easy-updates-manager-notices.php
7 years ago
updraft-notices.php
7 years ago
MPSUM_UpdraftCentral.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | if (!defined('ABSPATH')) die('No direct access allowed'); |
| 4 | |
| 5 | /** |
| 6 | * This file is the bootstrapper for UpdraftCentral integration: i.e. it registers what is necessary to deal with commands in the eum namespace. |
| 7 | */ |
| 8 | class MPSUM_UpdraftCentral { |
| 9 | |
| 10 | /** |
| 11 | * MPSUM_UpdraftCentral constructor. Registers required action hooks |
| 12 | */ |
| 13 | public function __construct() { |
| 14 | add_action('updraftplus_remotecontrol_command_classes', array($this, 'updraftplus_remotecontrol_command_classes')); |
| 15 | add_action('updraftcentral_command_class_wanted', array($this, 'updraftcentral_command_class_wanted')); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Register our class |
| 20 | * |
| 21 | * @param string $command_classes Passing over an arrya of command classes. |
| 22 | * @return array An array of command classes |
| 23 | */ |
| 24 | public function updraftplus_remotecontrol_command_classes($command_classes) { |
| 25 | if (is_array($command_classes)) $command_classes['eum'] = 'UpdraftCentral_EUM_Commands'; |
| 26 | return $command_classes; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Load the class when required |
| 31 | * |
| 32 | * @param string $command_php_class Passing over if there are any command classes. |
| 33 | */ |
| 34 | public function updraftcentral_command_class_wanted($command_php_class) { |
| 35 | if ('UpdraftCentral_EUM_Commands' == $command_php_class) { |
| 36 | // This fragment is only needed for compatibility with UD < 1.12.30 - thenceforth, the class can be assumed to exist. |
| 37 | if (!class_exists('UpdraftCentral_Commands')) { |
| 38 | include_once(apply_filters('updraftcentral_command_base_class_at', UPDRAFTPLUS_DIR.'/central/commands.php')); |
| 39 | } |
| 40 | include_once(MPSUM_Updates_Manager::get_plugin_dir('includes/MPSUM_UpdraftCentral_EUM_Commands.php')); |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 |