/**
  * Get post proccesed thumbnail
  *
  * @param int $height
  *        	Thumbnail height
  * @param int $width
  *        	Thumbnail width
  * @param boolean $crop
  *        	Crop thumbnail
  * @return string URL path to generated thumb
  * @author Panagiotis Vagenas <*****@*****.**>
  * @since 1.0.0
  */
 public function getThumbnail($height, $width, $crop)
 {
     if (!isset($this->thumbnail)) {
         $this->setThumbnail($this->options->getDefaultThumbnail());
     }
     if (($height > 0 || $width > 0) && $crop) {
         $image = $this->resize($this->thumbnail, (int) $width, (int) $height, (bool) $crop);
         if (!is_wp_error($image) && !empty($image)) {
             return $image;
         }
     }
     return $this->thumbnail;
 }
 public function formPostData(WP_Query $wpq, erpPROOptions $optionsObj, $ratings = array())
 {
     erpPROPaths::requireOnce(erpPROPaths::$erpPROPostData);
     $from = get_the_ID();
     $data = array('title' => $optionsObj->getValue('title'), 'options' => $this->options, 'uniqueID' => $this->uniqueID, 'optionsObj' => $optionsObj, 'posts' => array());
     while ($wpq->have_posts()) {
         $wpq->the_post();
         $rating = isset($ratings[get_the_ID()]) ? $ratings[get_the_ID()] : null;
         $postData = new erpPROPostData($wpq->post, $optionsObj, $rating, $from);
         if ($optionsObj->haveToShowExcerpt()) {
             $postData->setExcerpt($optionsObj->getValue('excLength'), $optionsObj->getValue('moreTxt'));
         }
         if ($optionsObj->haveToShowThumbnail()) {
             $postData->setThumbnail($optionsObj->getDefaultThumbnail());
         }
         array_push($data['posts'], $postData);
     }
     wp_reset_postdata();
     $this->setAdditionalViewData(array_merge($data, $this->options));
     return $this;
 }