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