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