Add plugin name as environment variable.

This commit is contained in:
marco
2015-08-08 16:51:44 +02:00
parent 110c5c1cff
commit fa16a49c1d
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ namespace MailPoet\Config;
if(!defined('ABSPATH')) exit;
class Env {
public static $plugin_name;
public static $plugin_prefix;
public static $db_prefix;
public static $db_source_name;
@ -15,6 +16,7 @@ class Env {
public static function init() {
global $wpdb;
self::$plugin_name = 'mailpoet';
self::$plugin_prefix = 'mailpoet_';
self::$db_prefix = $wpdb->prefix . self::$plugin_prefix;
self::$db_source_name = self::dbSourceName();

View File

@ -23,7 +23,7 @@ class Initializer {
$this->data = array();
$this->version = $params['version'];
$this->shortname = 'wysija-newsletters';
$this->shortname = Env::$plugin_name;
$this->file = $params['file'];
$this->path =(dirname($this->file));
$this->views_path = $this->path . '/views';