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