Browse Source

Added documentation

pull/3010/head
Michael Vogel 4 years ago
committed by Roland Haeder
parent
commit
dd71a05ab3
No known key found for this signature in database GPG Key ID: B72F8185C6C7BD78
1 changed files with 25 additions and 0 deletions
  1. +25
    -0
      include/plaintext.php

+ 25
- 0
include/plaintext.php View File

@ -1,4 +1,16 @@
<?php
/**
* @brief Fetches attachment data that were generated the old way
*
* @param string $body Message body
* @return array
* 'type' -> 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();


Loading…
Cancel
Save