From dd71a05ab320bea6edd0ac5d1b441f505342cf1c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 17 Apr 2016 20:55:19 +0200 Subject: [PATCH] Added documentation --- include/plaintext.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/plaintext.php b/include/plaintext.php index 95236027b1..c6e02a5b24 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -1,4 +1,16 @@ Message type ("link", "video", "photo") + * 'text' -> Text outside of the shared message + * 'image' -> Preview image of the message + * 'url' -> Url to the attached message + * 'title' -> Title of the attachment + * 'description' -> Description of the attachment + */ function get_old_attachment_data($body) { $post = array(); @@ -37,6 +49,19 @@ function get_old_attachment_data($body) { return $post; } +/** + * @brief Fetches attachment data that were generated with the "attachment" element + * + * @param string $body Message body + * @return array + * 'type' -> Message type ("link", "video", "photo") + * 'text' -> Text before the shared message + * 'after' -> Text after the shared message + * 'image' -> Preview image of the message + * 'url' -> Url to the attached message + * 'title' -> Title of the attachment + * 'description' -> Description of the attachment + */ function get_attachment_data($body) { $data = array(); -- 2.39.5