/** * Main WP_Email_Delivery Instance * * Ensures only one instance of WP_Email_Delivery is loaded or can be loaded. * * @since 1.0.0 * @static * @see WP_Email_Delivery() * @return Main WP_Email_Delivery instance */ public static function instance($file = '', $version = '1.0.0') { if (is_null(self::$_instance)) { self::$_instance = new self($file, $version); } else { return self::$_instance; } self::$_instance->setup_constants(); if (is_null(self::$_instance->settings)) { self::$_instance->settings = WP_Email_Delivery_Settings::instance(self::$_instance); } if (is_null(self::$_instance->connections)) { self::$_instance->connections = WP_Email_Delivery_Connections::instance(self::$_instance); } return self::$_instance; }
/** * Returns the main instance of WP_Email_Delivery to prevent the need to use globals. * * @since 1.0.0 * @return object WP_Email_Delivery */ function WPED() { return WP_Email_Delivery::instance(__FILE__, '1.0.8'); }