mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +02:00
Fixes to keep Facebook Open-Graph happy.
This commit is contained in:
@@ -3680,6 +3680,8 @@ class eResponse
|
||||
protected $_META_KEYWORDS = array();
|
||||
protected $_render_mod = array('default' => 'default');
|
||||
protected $_meta_title_separator = ' - ';
|
||||
protected $_meta_name_only = array('keywords', 'viewport'); // Keep FB happy.
|
||||
protected $_meta_property_only = array('article:section', 'article:tag'); // Keep FB happy.
|
||||
protected $_meta = array();
|
||||
protected $_title_separator = ' » ';
|
||||
protected $_content_type = 'html';
|
||||
@@ -3972,9 +3974,16 @@ class eResponse
|
||||
{
|
||||
// $key = (substr($name,0,3) == 'og:') ? 'property' : 'name';
|
||||
// $attr[$key] = $name;
|
||||
if(!in_array($name, $this->_meta_name_only))
|
||||
{
|
||||
$attr['property'] = $name; // giving both should be valid and avoid issues with FB and others.
|
||||
}
|
||||
|
||||
if(!in_array($name, $this->_meta_property_only))
|
||||
{
|
||||
$attr['name'] = $name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user