Ejemplo n.º 1
0
 /**
  * Static Singleton Factory Method
  *
  * @return self
  */
 public static function instance()
 {
     if (empty(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Ejemplo n.º 2
0
/**
 * Shortcut for Tribe__Assets::register(), include a single asset
 *
 * @param  object   $origin     The main Object for the plugin you are enqueueing the script/style for
 * @param  string   $slug       Slug to save the asset
 * @param  string   $file       Which file will be loaded, either CSS or JS
 * @param  array    $deps       Dependencies
 * @param  string   $action     A WordPress Action, needs to happen after: `wp_enqueue_scripts`, `admin_enqueue_scripts`, or `login_enqueue_scripts`
 * @param  array    $arguments  Look at `Tribe__Assets::register()` for more info
 *
 * @return array             Which Assets was registered
 */
function tribe_asset($origin, $slug, $file, $deps = array(), $action = null, $arguments = array())
{
    return Tribe__Assets::instance()->register($origin, $slug, $file, $deps, $action, $arguments);
}