/**
  * 
  * delete slide from data
  */
 public function deleteSlideFromData($data)
 {
     $sliderID = UniteFunctionsRev::getVal($data, "sliderID");
     $slider = new RevSlider();
     $slider->initByID($sliderID);
     $isPost = $slider->isSlidesFromPosts();
     if ($isPost == true) {
         //delete post
         $postID = UniteFunctionsRev::getVal($data, "slideID");
         UniteFunctionsWPRev::deletePost($postID);
     } else {
         //delete slide
         $slideID = UniteFunctionsRev::getVal($data, "slideID");
         $this->initByID($slideID);
         $this->deleteChildren();
         $this->deleteSlide();
     }
     RevOperations::updateDynamicCaptions();
 }