/** * Main Mailtpl Instance * * Ensures only one instance of Mailtpl is loaded or can be loaded. * * @since 1.0.0 * @static * @see Mailtpl() * @return Mailtpl - Main instance */ public static function instance() { if (is_null(self::$_instance)) { self::$_instance = new self(); } return self::$_instance; }
/** * Begins execution of the plugin. * @since 1.0.0 */ function Mailtpl() { $plugin = Mailtpl::instance(); $plugin->run(); }
<?php $settings = Mailtpl::opts(); include_once 'partials/header.php'; include_once 'partials/email-content.php'; include_once 'partials/footer.php';
/** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $plugin_name The name of this plugin. * @param string $version The version of this plugin. */ public function __construct($plugin_name, $version) { $this->plugin_name = $plugin_name; $this->version = $version; $this->defaults = Mailtpl::defaults(); }