/** * Global Sensei Instance * * Ensure that only one instance of the main Sensei class can be loaded. * * @since 1.8.0 * @static * @see WC() * @return WooThemes_Sensei Instance. */ public static function instance() { if (is_null(self::$_instance)) { //Sensei requires a reference to the main Sensei plugin file $sensei_main_plugin_file = dirname(dirname(__FILE__)) . '/woothemes-sensei.php'; self::$_instance = new self($sensei_main_plugin_file); // load the global class objects needed throughout Sensei self::$_instance->initialize_global_objects(); } return self::$_instance; }
/** * Returns the global Sensei Instance. * * @since 1.8.0 */ function Sensei() { return Sensei_Main::instance(); }