banner
8 months ago
bodies
8 months ago
check
8 months ago
cli
8 months ago
cron
8 months ago
dashboard
8 months ago
database
8 months ago
external
8 months ago
extracter
8 months ago
htaccess
8 months ago
notices
8 months ago
progress
8 months ago
scanner
8 months ago
staging
8 months ago
traits
8 months ago
uploader
8 months ago
vendor
8 months ago
zipper
8 months ago
.htaccess
8 months ago
activation.php
8 months ago
ajax.php
8 months ago
ajax_offline.php
8 months ago
analyst.php
8 months ago
backup-process.php
8 months ago
class-backup-method-mananger.php
8 months ago
cli-handler.php
8 months ago
compatibility.php
8 months ago
config.php
8 months ago
constants.php
8 months ago
file-explorer.php
8 months ago
initializer.php
8 months ago
logger.php
8 months ago
offline.php
8 months ago
activation.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | // Namespace |
| 4 | namespace BMI\Plugin; |
| 5 | |
| 6 | // Exit on direct access |
| 7 | if (!defined('ABSPATH')) exit; |
| 8 | |
| 9 | // Alias for classes |
| 10 | use BMI\Plugin\BMI_Logger as Logger; |
| 11 | |
| 12 | // Activation |
| 13 | if (!function_exists('bmi_activate_plugin')) { |
| 14 | function bmi_activate_plugin() { |
| 15 | |
| 16 | // Require classes |
| 17 | require_once BMI_INCLUDES . '/logger.php'; |
| 18 | require_once BMI_ROOT_DIR . '/includes/constants.php'; |
| 19 | |
| 20 | // Since 1.2.8 |
| 21 | if (!get_option('bmi_initial_installation_version', false)) { |
| 22 | update_option('bmi_initial_installation_version', BMI_VERSION); |
| 23 | } |
| 24 | |
| 25 | // Log the activation |
| 26 | Logger::log(__("Plugin has been activated", 'backup-backup')); |
| 27 | update_option('_bmi_redirect', true); |
| 28 | |
| 29 | } |
| 30 | } |
| 31 |