Ejemplo n.º 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_Settings Instance
  *
  * Ensures only one instance of U_Next_Story_Settings is loaded or can be loaded.
  *
  * @since 1.0.0
  * @static
  * @see U_Next_Story()
  * @return Main U_Next_Story_Settings instance
  */
 public static function instance($parent)
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self($parent);
     }
     return self::$_instance;
 }