function __construct($options)
 {
     $this->slug = 'instagram';
     $this->name = 'Instagram';
     $this->sequential = true;
     parent::__construct($options);
 }
 function __construct($options)
 {
     $this->name = '500px';
     $this->slug = '500px';
     $this->categories = array('' => __('Everything', 'asg'), '0' => __('Uncategorized', 'asg'), '10' => __('Abstract', 'asg'), '11' => __('Animals', 'asg'), '5' => __('Black and White', 'asg'), '1' => __('Celebrities', 'asg'), '9' => __('City and Architecture', 'asg'), '15' => __('Commercial', 'asg'), '16' => __('Concert', 'asg'), '20' => __('Family', 'asg'), '14' => __('Fashion', 'asg'), '2' => __('Film', 'asg'), '24' => __('Fine Art', 'asg'), '23' => __('Food', 'asg'), '3' => __('Journalism', 'asg'), '8' => __('Landscapes', 'asg'), '12' => __('Macro', 'asg'), '18' => __('Nature', 'asg'), '4' => __('Nude', 'asg'), '7' => __('People', 'asg'), '19' => __('Performing Arts', 'asg'), '17' => __('Sport', 'asg'), '18' => __('Still life', 'asg'), '21' => __('Street', 'asg'), '26' => __('Transportation', 'asg'), '13' => __('Travel', 'asg'), '22' => __('Underwater', 'asg'), '23' => __('Urban Exploration', 'asg'), '25' => __('Wedding', 'asg'), '27' => __('Urban Exploration', 'asg'));
     parent::__construct($options);
 }
 function __construct($options)
 {
     $this->slug = 'facebook';
     $this->name = __('facebook', 'asg');
     $this->sequential = true;
     parent::__construct($options);
 }
 static function drop_cache($id)
 {
     $gallery = asg_get_gallery($id);
     $page = 1;
     $per_page = $gallery['load_more']['page_size'];
     while (get_transient($transient_key = ASG_Http_Source::get_transient_key($id, $page, $per_page))) {
         delete_transient($transient_key);
         $page += 1;
     }
 }
 function __construct($options)
 {
     $this->slug = 'rss';
     $this->name = 'RSS';
     parent::__construct($options);
 }
 function fetch_image_size($data, $url, $options)
 {
     if (isset($data['height_l']) && isset($data['width_l'])) {
         return array('width' => $data['width_l'], 'height' => $data['height_l']);
     }
     return parent::fetch_image_size($data, $url, $options);
 }
 function get_images($page = 1, $per_page = 160, $options = array())
 {
     if (defined('ASG_NO_CACHE') && ASG_NO_CACHE) {
         return $this->get_images_without_caching($page, $per_page, $options);
     }
     $key = ASG_Http_Source::get_transient_key($this->source['id'], $page, $per_page);
     $images = get_transient($key);
     if (false === $images || !is_array($images = unserialize(base64_decode($images)))) {
         $images = $this->get_images_without_caching($page, $per_page, $options);
         set_transient($key, base64_encode(serialize($images)), $options['caching']);
     }
     return $images;
 }
 function fetch_image_size($image, $url, $options)
 {
     if ($this->c_use_ngg_thumbnails = $this->use_ngg_thumbnails($image, $options)) {
         $settings = C_Settings_Model::get_instance();
         return array('width' => $settings->thumbwidth, 'height' => $settings->thumbheight);
     } else {
         if (isset($metadata['width']) && isset($metadata['height']) && (int) $metadata['width'] && (int) $metadata['height']) {
             return array('width' => $metadata['width'], 'height' => $metadata['height']);
         }
         return parent::fetch_image_size($image, $url, $options);
     }
 }