- Added activation hook in main file (mailpoet.php) - auto deactivate plugin in case of fatal errors during init
25 lines
404 B
PHP
25 lines
404 B
PHP
<?php
|
|
namespace MailPoet\Config;
|
|
use \MailPoet\Config\Migrator;
|
|
use \MailPoet\Config\Populator;
|
|
|
|
if(!defined('ABSPATH')) exit;
|
|
|
|
class Activator {
|
|
function __construct() {
|
|
}
|
|
|
|
function activate() {
|
|
$migrator = new Migrator();
|
|
$migrator->up();
|
|
|
|
$populator = new Populator();
|
|
$populator->up();
|
|
}
|
|
|
|
function deactivate() {
|
|
$migrator = new Migrator();
|
|
$migrator->down();
|
|
}
|
|
}
|