Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions vanilla/applications/dashboard/modules/class.headmodule.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,8 @@ public function toString() {
$hasRelevantImage = false;

// Default to the site logo if there were no images provided by the controller.
if (count($this->_Sender->image()) == 0) {
// Show the same image for all pages
//if (count($this->_Sender->image()) == 0) {
$logo = c('Garden.ShareImage', c('Garden.Logo', ''));
if ($logo != '') {
// Fix the logo path.
Expand All @@ -481,12 +482,12 @@ public function toString() {
// $logo = Gdn_Upload::url($logo);
$this->addTag('meta', ['property' => 'og:image', 'content' => Gdn::request()->domain().$logo]);
}
} else {
foreach ($this->_Sender->image() as $img) {
$this->addTag('meta', ['name' => 'twitter:image', 'property' => 'og:image', 'content' => $img]);
$hasRelevantImage = true;
}
}
// } else {
// foreach ($this->_Sender->image() as $img) {
// $this->addTag('meta', ['name' => 'twitter:image', 'property' => 'og:image', 'content' => $img]);
// $hasRelevantImage = true;
// }
// }

// For the moment at least, only discussions are supported.
if ($title && val('DiscussionID', $this->_Sender)) {
Expand Down