We are going to use this class to store all variables that we would store with globals and defines. It will be initialized in the initializer and we'll be able to get any variable with static methods.
21 lines
326 B
PHP
21 lines
326 B
PHP
<?php
|
|
namespace MailPoet\Config;
|
|
use \MailPoet\WP;
|
|
|
|
if(!defined('ABSPATH')) exit;
|
|
|
|
class Settings {
|
|
|
|
function __construct() {
|
|
$this->options = new WP\Option();
|
|
}
|
|
|
|
function load($name) {
|
|
return $this->options->get($name);
|
|
}
|
|
|
|
function save($name, $value) {
|
|
return $this->options->set($name, $value);
|
|
}
|
|
}
|