public function __construct($name)
 {
     $this->addonPath = '/addons/' . $name;
     $this->addonDir = WPUltimatePostGridPremium::get()->premiumDir . $this->addonPath;
     $this->addonUrl = WPUltimatePostGridPremium::get()->premiumUrl . $this->addonPath;
     $this->addonName = $name;
 }
 public function add()
 {
     $assets = func_get_args();
     foreach ($assets as $asset) {
         if (isset($asset['file'])) {
             if (!isset($asset['type'])) {
                 $asset['type'] = pathinfo($asset['file'], PATHINFO_EXTENSION);
             }
             if (!isset($asset['priority'])) {
                 $asset['priority'] = 10;
             }
             // Set a URL and DIR variable
             if (isset($asset['direct']) && $asset['direct']) {
                 $asset['url'] = $asset['file'];
                 $asset['dir'] = $asset['file'];
             } else {
                 $base_url = WPUltimatePostGrid::get()->coreUrl;
                 $base_dir = WPUltimatePostGrid::get()->coreDir;
                 if (isset($asset['premium']) && $asset['premium']) {
                     $base_url = WPUltimatePostGridPremium::get()->premiumUrl;
                     $base_dir = WPUltimatePostGridPremium::get()->premiumDir;
                 }
                 $asset['url'] = $base_url . $asset['file'];
                 $asset['dir'] = $base_dir . $asset['file'];
             }
             $this->assets[] = $asset;
         }
     }
 }