/** * This function is used to get all the attachment ids from the submissions * * @param int $form_id * @return boolean */ public function get_all_form_attachments($form_id) { $attachments = RM_DBManager::get_all_form_attachments($form_id); if ($attachments) { $all_attachments = array(); foreach ($attachments as $key => $attachment) { $attachment = maybe_unserialize($attachment); if (is_array($attachment)) { foreach ($attachment as $att) { if (wp_get_attachment_url($att)) { $all_attachments[] = $att; } } } } } else { return false; } return $all_attachments; }