mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Make sure og:type always has a value.
This commit is contained in:
@@ -46,12 +46,18 @@ class social_event
|
|||||||
{
|
{
|
||||||
$ogImage = e107::pref('social', 'og_image', false);
|
$ogImage = e107::pref('social', 'og_image', false);
|
||||||
|
|
||||||
|
if(empty($meta['og:type']))
|
||||||
|
{
|
||||||
|
e107::meta('og:image', 'website');
|
||||||
|
}
|
||||||
|
|
||||||
if(empty($ogImage) || empty($meta) || e_ADMIN_AREA === true)
|
if(empty($ogImage) || empty($meta) || e_ADMIN_AREA === true)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if we have og:image defined
|
// check if we have og:image defined
|
||||||
|
|
||||||
foreach($meta as $m)
|
foreach($meta as $m)
|
||||||
{
|
{
|
||||||
if($m['name'] === 'og:image')
|
if($m['name'] === 'og:image')
|
||||||
|
Reference in New Issue
Block a user