aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-10-11 09:55:06 +0200
committerMax Kostikov <max@kostikov.co>2019-10-11 09:55:06 +0200
commit125de855efd5fefdd25b47e7c9c7a4eca064f2b0 (patch)
treef99a57d6164a32894e9cc29e199d95a284086dc4
parent3881ebcce062b6857d13f98212c50cdcd6b8b49d (diff)
downloadvolse-hubzilla-125de855efd5fefdd25b47e7c9c7a4eca064f2b0.tar.gz
volse-hubzilla-125de855efd5fefdd25b47e7c9c7a4eca064f2b0.tar.bz2
volse-hubzilla-125de855efd5fefdd25b47e7c9c7a4eca064f2b0.zip
Add Opengraph og:type object
-rw-r--r--Zotlabs/Module/Channel.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index e83b42d67..e981257bc 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -394,6 +394,7 @@ class Channel extends Controller {
$ogdesc = str_replace(" ", " ", $ogdesc);
if (substr($ogdesc, -1) != "\n")
$ogdesc = rtrim(substr($ogdesc, 0, strrpos($ogdesc, " ")), "?.,:;!-") . "...";
+ $ogtype = "article";
}
$channel = channelx_by_n(App::$profile['profile_uid']);
@@ -410,6 +411,7 @@ class Channel extends Controller {
App::$page['htmlhead'] .= '<meta property="og:title" content="' . htmlspecialchars((isset($ogtitle) ? $ogtitle : $channel['channel_name'])) . '">' . "\r\n";
App::$page['htmlhead'] .= '<meta property="og:image" content="' . (isset($ogimage) ? $ogimage : $channel['xchan_photo_l']) . '">' . "\r\n";
App::$page['htmlhead'] .= '<meta property="og:description" content="' . htmlspecialchars($ogdesc) . '">' . "\r\n";
+ App::$page['htmlhead'] .= '<meta property="og:type" content="' . (isset($ogtype) ? $ogtype : "profile") . '">' . "\r\n";
if((! $update) && (! $load)) {