function getNumberOfGalleries($limit = -1)
 {
     static $count;
     if ($count) {
         return $count;
     } else {
         return $count = Count(Get_Posts(array('post_type' => $this->post_type, 'post_status' => 'any', 'numberposts' => $limit)));
     }
 }
Beispiel #2
0
 public function ShortCode_Gallery($attributes = array())
 {
     $attributes = $this->Generate_Gallery_Attributes($attributes);
     # Get Images
     $arr_gallery = Get_Posts($attributes);
     # There are no attachments
     if (empty($arr_gallery)) {
         return False;
     }
     # Build the Gallery object
     $this->Build_Gallery($arr_gallery, $attributes);
     # Load Template
     return $this->Render_Gallery($attributes['template']);
 }