banner
2 years ago
check
2 years ago
cli
2 years ago
cron
2 years ago
dashboard
2 years ago
database
2 years ago
extracter
2 years ago
file:
2 years ago
htaccess
2 years ago
progress
2 years ago
scanner
2 years ago
staging
2 years ago
uploader
2 years ago
zipper
2 years ago
.htaccess
2 years ago
activation.php
2 years ago
ajax.php
2 years ago
analyst.php
2 years ago
backup-heart.php
2 years ago
bypasser.php
2 years ago
cli-handler.php
2 years ago
compatibility.php
2 years ago
config.php
2 years ago
constants.php
2 years ago
initializer.php
2 years ago
logger.php
2 years ago
restore-batching.php
2 years 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 |