mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Issue #4785 Make sure the og:description matches the meta description.
This commit is contained in:
@@ -73,20 +73,26 @@ class social_event
|
||||
{
|
||||
$description = e107::getSingleton('eResponse')->getMetaDescription();
|
||||
|
||||
if(empty($description) && deftrue('META_DESCRIPTION'))
|
||||
if(empty($description))
|
||||
{
|
||||
$description = META_DESCRIPTION;
|
||||
}
|
||||
else
|
||||
{
|
||||
$description = e107::pref('core', 'meta_description');
|
||||
if(deftrue('META_DESCRIPTION'))
|
||||
{
|
||||
$description = META_DESCRIPTION;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tmp = e107::pref('core', 'meta_description');
|
||||
if(!empty($tmp[e_LANGUAGE]))
|
||||
{
|
||||
$description = $tmp[e_LANGUAGE];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($description))
|
||||
{
|
||||
e107::meta('og:description', $description);
|
||||
e107::meta('twitter:description', $description);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user