- Updated Settings Router to new standards - Updated settings.html to reflect API change with better error handling - Updated Settings API unit tests
27 lines
412 B
PHP
27 lines
412 B
PHP
<?php
|
|
namespace MailPoet\API
|
|
;
|
|
|
|
use \MailPoet\Config\Activator;
|
|
|
|
if(!defined('ABSPATH')) exit;
|
|
|
|
class Setup {
|
|
function __construct() {
|
|
}
|
|
|
|
function reset() {
|
|
try {
|
|
$activator = new Activator();
|
|
$activator->deactivate();
|
|
$activator->activate();
|
|
$result = true;
|
|
} catch(\Exception $e) {
|
|
$result = false;
|
|
}
|
|
return array(
|
|
'result' => $result
|
|
);
|
|
}
|
|
}
|