From 72cdef912ac6d132ad19ccca32ec4f62280efe95 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 3 Jun 2022 10:19:32 -0700 Subject: [PATCH] Issue #4785 Make sure the og:description matches the meta description. --- e107_plugins/social/e_event.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/e107_plugins/social/e_event.php b/e107_plugins/social/e_event.php index 1b92d31b8..1fdf388d1 100644 --- a/e107_plugins/social/e_event.php +++ b/e107_plugins/social/e_event.php @@ -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); - } }