*/
require_once 'mod/item.php';
use Friendica\App;
+use Friendica\Content\PageInfo;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
}
if ($item['type'] == 'link') {
- $data = query_page_info($item['link']);
+ $data = PageInfo::queryUrl($item['link']);
if (isset($item['title']) && (trim($item['title']) != '')) {
$data['title'] = $item['title'];
$data['text'] = $item['description'];
}
- $_REQUEST['body'] .= add_page_info_data($data);
+ $_REQUEST['body'] .= "\n" . PageInfo::getFooterFromData($data);
} elseif (($item['type'] == 'photo') && ($item['image'] != '')) {
$_REQUEST['body'] .= "\n\n[img]" . $item['image'] . "[/img]\n";
}
use CodebirdSN\CodebirdSN;
use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Content\PageInfo;
use Friendica\Content\Text\HTML;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Hook;
$_REQUEST["title"] = "";
- $_REQUEST["body"] = add_page_info_to_body($post->text, true);
+ $_REQUEST["body"] = PageInfo::appendToBody($post->text, true);
if (is_string($post->place->name)) {
$_REQUEST["location"] = $post->place->name;
}
}
if ($footerurl != "") {
- $footer = add_page_info($footerurl);
+ $footer = "\n" . PageInfo::getFooterFromUrl($footerurl);
}
if (($footerlink != "") && (trim($footer) != "")) {
use Codebird\Codebird;
use Friendica\App;
use Friendica\Content\OEmbed;
+use Friendica\Content\PageInfo;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\Plaintext;
use Friendica\Core\Hook;
if (empty($status->quoted_status)) {
$footer = '';
if ($attachmentUrl) {
- $footer = add_page_info($attachmentUrl, false, $picture);
+ $footer = "\n" . PageInfo::getFooterFromUrl($attachmentUrl, false, $picture);
}
if (trim($footer)) {
} elseif ($picture) {
$body .= "\n\n[img]" . $picture . "[/img]\n";
} else {
- $body = add_page_info_to_body($body);
+ $body = PageInfo::appendToBody($body);
}
}