summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-21 09:35:43 +0300
committerAndrew Dolgov <[email protected]>2021-03-21 09:35:43 +0300
commit68299c914b0fc0ec98e6dbb68f75f733df6dc48b (patch)
tree1953c6c8fc3e895f12f3de3f78e84e1820943891 /plugins
parent718c9f07fa24a5457757d6903221630acbf2957c (diff)
share: move og:image back to head
Diffstat (limited to 'plugins')
-rw-r--r--plugins/share/init.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/share/init.php b/plugins/share/init.php
index 4ad788428..195f9df2a 100644
--- a/plugins/share/init.php
+++ b/plugins/share/init.php
@@ -149,6 +149,9 @@ class Share extends Plugin {
$line['content'] = DiskCache::rewrite_urls($line['content']);
+ if (!$og_image)
+ $og_image = Config::get_self_url() . "/images/favicon-512px.png";
+
ob_start();
?>
@@ -180,11 +183,11 @@ class Share extends Plugin {
strip_tags($content_decoded)
)
), 500, "...")) ?>">
- </head>
- <?php if ($og_image) { ?>
- <meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
- <?php } ?>
+ <?php if ($og_image) { ?>
+ <meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
+ <?php } ?>
+ </head>
<body class='flat ttrss_utility ttrss_zoom css_loading'>
<div class='container'>