Skip to content

Commit

Permalink
Revert "Open Graph for image with og:image and image_src" (#4874)
Browse files Browse the repository at this point in the history
  • Loading branch information
810 committed Oct 25, 2016
1 parent f6494ec commit 29ccde2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 42 deletions.
Expand Up @@ -11,9 +11,9 @@
**/
defined('_JEXEC') or die();

$document = JFactory::getDocument();
// @var KunenaAttachment $attachment

$attachment = $this->attachment;
$doctype = $document->getType();

$location = JUri::root() . $attachment->getUrl();
$data = getimagesize($location);
Expand All @@ -25,14 +25,6 @@
return;
}

// Only render for HTML output
if ($doctype == 'html')
{
$document->addCustomTag('<link rel="image_src" href="' . JURI::base() . $attachment->getUrl() . '">');
$document->addCustomTag ('<meta property="og:image" content="' . JURI::base() . $attachment->getUrl() . '" />');
$document->addCustomTag ('<meta name="twitter:image:src" content="' . JURI::base() . $attachment->getUrl() . '" />');
}

echo $this->subLayout('Widget/Lightbox');

$config = KunenaConfig::getInstance();
Expand Down
Expand Up @@ -11,17 +11,6 @@
**/
defined('_JEXEC') or die();

$document = JFactory::getDocument();
$doctype = $document->getType();

// Only render for HTML output
if ($doctype == 'html')
{
$document->addCustomTag('<link rel="image_src" href="' . JURI::base() . $attachment->getUrl() . '">');
$document->addCustomTag ('<meta property="og:image" content="' . JURI::base() . $attachment->getUrl() . '" />');
$document->addCustomTag ('<meta name="twitter:image:src" content="' . JURI::base() . $attachment->getUrl() . '" />');
}

$title = $this->title;
$url = $this->url;
$filename = $this->filename;
Expand Down
Expand Up @@ -11,9 +11,9 @@
**/
defined('_JEXEC') or die();

$document = JFactory::getDocument();
// @var KunenaAttachment $attachment

$attachment = $this->attachment;
$doctype = $document->getType();

$location = JUri::root() . $attachment->getUrl();
$data = getimagesize($location);
Expand All @@ -25,14 +25,6 @@
return;
}

// Only render for HTML output
if ($doctype == 'html')
{
$document->addCustomTag('<link rel="image_src" href="' . JURI::base() . $attachment->getUrl() . '">');
$document->addCustomTag ('<meta property="og:image" content="' . JURI::base() . $attachment->getUrl() . '" />');
$document->addCustomTag ('<meta name="twitter:image:src" content="' . JURI::base() . $attachment->getUrl() . '" />');
}

echo $this->subLayout('Widget/Lightbox');

$config = KunenaConfig::getInstance();
Expand Down
Expand Up @@ -11,17 +11,6 @@
**/
defined('_JEXEC') or die();

$document = JFactory::getDocument();
$doctype = $document->getType();

// Only render for HTML output
if ($doctype == 'html')
{
$document->addCustomTag('<link rel="image_src" href="' . JURI::base() . $attachment->getUrl() . '">');
$document->addCustomTag ('<meta property="og:image" content="' . JURI::base() . $attachment->getUrl() . '" />');
$document->addCustomTag ('<meta name="twitter:image:src" content="' . JURI::base() . $attachment->getUrl() . '" />');
}

$title = $this->title;
$url = $this->url;
$filename = $this->filename;
Expand Down

0 comments on commit 29ccde2

Please sign in to comment.