/**
  * cbCommentAjaxFunction
  */
 public static function cbCommentAjaxFunction()
 {
     //cbratingsystemcomment
     if (isset($_POST['cbRatingData']) and !empty($_POST['cbRatingData'])) {
         $returnedData = $_POST['cbRatingData'];
         //verify nonce
         check_ajax_referer('cbratingsystemcomment-' . $returnedData['id'], 'nonce');
         $insertArray['id'] = $returnedData['id'];
         $insertArray['form_id'] = (int) $returnedData['form_id'];
         $insertArray['post_id'] = (int) $returnedData['post_id'];
         //$insertArray['form_id']        = (int) $insertArray['form_id'];
         //$insertArray['post_id']        = (int) $insertArray['post_id'];
         $insertArray['comment_status'] = $returnedData['comment_status'];
         $id = array($insertArray['id']);
         $post_id = array($insertArray['post_id']);
         $form_id = array($insertArray['form_id']);
         if ($insertArray['comment_status'] != 'delete') {
             $return = CBRatingSystemData::update_rating_comment($insertArray);
         } else {
             $return = CBRatingSystemData::delete_ratings($id, $post_id, $form_id);
         }
         $cb_return_data = __('Saved', 'cbratingsystem');
         echo json_encode($cb_return_data);
         die;
     }
 }