backup-backup
Last commit date
admin
11 months ago
analyst
11 months ago
includes
11 months ago
modules
11 months ago
backup-backup.php
11 months ago
readme.txt
11 months ago
uninstall.php
11 months ago
backup-backup.php
70 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Plugin Name: Backup Migration |
| 5 | * Description: Most sophisticated backup & migration plugin for WordPress |
| 6 | * Author: Inisev |
| 7 | * Author URI: https://inisev.com |
| 8 | * Plugin URI: https://backupbliss.com |
| 9 | * Text Domain: backup-backup |
| 10 | * Version: 1.4.9 |
| 11 | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ |
| 12 | |
| 13 | // Exit on direct access |
| 14 | if (!defined('ABSPATH')) exit; |
| 15 | |
| 16 | // Default namespace |
| 17 | use BMI\Plugin AS BMI; |
| 18 | |
| 19 | // Not dynamic constants |
| 20 | if (!defined('BMI_DEBUG')) { |
| 21 | define('BMI_DEBUG', false); |
| 22 | } |
| 23 | if (!defined('BMI_VERSION')) { |
| 24 | define('BMI_VERSION', '1.4.9'); |
| 25 | } |
| 26 | if (!defined('BMI_ROOT_DIR')) { |
| 27 | define('BMI_ROOT_DIR', __DIR__); |
| 28 | } |
| 29 | if (!defined('BMI_ROOT_FILE')) { |
| 30 | define('BMI_ROOT_FILE', __FILE__); |
| 31 | } |
| 32 | if (!defined('BMI_INCLUDES')) { |
| 33 | define('BMI_INCLUDES', BMI_ROOT_DIR . DIRECTORY_SEPARATOR . 'includes'); |
| 34 | } |
| 35 | if (!defined('BMI_MODULES_DIR')) { |
| 36 | define('BMI_MODULES_DIR', BMI_ROOT_DIR . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR); |
| 37 | } |
| 38 | |
| 39 | // Activation hook |
| 40 | register_activation_hook(BMI_ROOT_FILE, function () { |
| 41 | require_once BMI_INCLUDES . DIRECTORY_SEPARATOR . 'activation.php'; |
| 42 | BMI\bmi_activate_plugin(); |
| 43 | }); |
| 44 | |
| 45 | // Fixes for some cases |
| 46 | require_once BMI_INCLUDES . DIRECTORY_SEPARATOR . 'compatibility.php'; |
| 47 | |
| 48 | // Opt-in sub plugin |
| 49 | require_once BMI_INCLUDES . DIRECTORY_SEPARATOR . 'analyst.php'; |
| 50 | |
| 51 | // Load plugin after all |
| 52 | add_action('init', function () { |
| 53 | |
| 54 | // Global plugin variables |
| 55 | require_once BMI_ROOT_DIR . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'constants.php'; |
| 56 | |
| 57 | // Initialize backup-migration |
| 58 | if (!class_exists('Backup_Migration_Plugin')) { |
| 59 | |
| 60 | // Require initializator |
| 61 | require_once BMI_ROOT_DIR . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'initializer.php'; |
| 62 | |
| 63 | // Initialize entire plugin |
| 64 | $bmi_instance = new BMI\Backup_Migration_Plugin(); |
| 65 | $bmi_instance->initialize(); |
| 66 | |
| 67 | } |
| 68 | |
| 69 | }, 15); |
| 70 |