/**
  * 
  * replace layer placeholders by post data
  */
 private function setLayersByPostData($postData, $sliderID)
 {
     $postID = $postData["ID"];
     $title = UniteFunctionsRev::getVal($postData, "post_title");
     $excerpt_limit = $this->getSliderParam($sliderID, "excerpt_limit", 55, RevSlider::VALIDATE_NUMERIC);
     $excerpt_limit = (int) $excerpt_limit;
     $excerpt = UniteFunctionsWPRev::getExcerptById($postID, $excerpt_limit);
     $alias = UniteFunctionsRev::getVal($postData, "post_name");
     $content = UniteFunctionsRev::getVal($postData, "post_content");
     $link = get_permalink($postID);
     $postDate = UniteFunctionsRev::getVal($postData, "post_date_gmt");
     $postDate = UniteFunctionsWPRev::convertPostDate($postDate);
     $dateModified = UniteFunctionsRev::getVal($postData, "post_modified");
     $dateModified = UniteFunctionsWPRev::convertPostDate($dateModified);
     $authorID = UniteFunctionsRev::getVal($postData, "post_author");
     $authorName = UniteFunctionsWPRev::getUserDisplayName($authorID);
     $postCatsIDs = $postData["post_category"];
     $catlist = UniteFunctionsWPRev::getCategoriesHtmlList($postCatsIDs);
     $taglist = UniteFunctionsWPRev::getTagsHtmlList($postID);
     $numComments = UniteFunctionsRev::getVal($postData, "comment_count");
     foreach ($this->arrLayers as $key => $layer) {
         $text = UniteFunctionsRev::getVal($layer, "text");
         $text = str_replace("%title%", $title, $text);
         $text = str_replace("%excerpt%", $excerpt, $text);
         $text = str_replace("%alias%", $alias, $text);
         $text = str_replace("%content%", $content, $text);
         $text = str_replace("%link%", $link, $text);
         $text = str_replace("%date%", $postDate, $text);
         $text = str_replace("%date_modified%", $dateModified, $text);
         $text = str_replace("%author_name%", $authorName, $text);
         $text = str_replace("%num_comments%", $numComments, $text);
         $text = str_replace("%catlist%", $catlist, $text);
         $text = str_replace("%taglist%", $taglist, $text);
         //process meta tags:
         $arrMatches = array();
         $text = str_replace('-', '_REVSLIDER_', $text);
         preg_match('/%meta:\\w+%/', $text, $arrMatches);
         foreach ($arrMatches as $match) {
             $meta = str_replace("%meta:", "", $match);
             $meta = str_replace("%", "", $meta);
             $meta = str_replace('_REVSLIDER_', '-', $meta);
             $metaValue = get_post_meta($postID, $meta, true);
             $text = str_replace($match, $metaValue, $text);
         }
         $text = str_replace('_REVSLIDER_', '-', $text);
         //replace event's template
         if (UniteEmRev::isEventsExists()) {
             $eventData = UniteEmRev::getEventPostData($postID);
             if (!empty($eventData)) {
                 foreach ($eventData as $eventKey => $eventValue) {
                     $eventPlaceholder = "%event_" . $eventKey . "%";
                     if ($eventKey == 'start_date' || $eventKey == 'end_date') {
                         $eventValue = UniteFunctionsWPRev::convertPostDate($eventValue);
                     }
                     $text = str_replace($eventPlaceholder, $eventValue, $text);
                 }
             }
         }
         //$text = str_replace("location", "maxim" , $text);
         $layer["text"] = $text;
         $this->arrLayers[$key] = $layer;
     }
     //$allMeta = get_post_meta($postID);
     //dmp($allMeta);exit();
 }