1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Fixes #751 - Meta-tag issues.

This commit is contained in:
Cameron
2015-04-08 22:05:32 -07:00
parent d543ab71ff
commit 4c7c3dfd47
3 changed files with 23 additions and 16 deletions

View File

@@ -142,8 +142,22 @@ if(vartrue($pref['meta_author'][e_LANGUAGE])) e107::meta('author',$pref['meta_au
if($pref['sitebutton']) e107::meta('og:image',$tp->replaceConstants($pref['sitelogo'],'full')); if($pref['sitebutton']) e107::meta('og:image',$tp->replaceConstants($pref['sitelogo'],'full'));
if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY if(defined("VIEWPORT")) e107::meta('viewport',VIEWPORT); //BC ONLY
echo e107::getUrl()->response()->renderMeta()."\n";
// Load Plugin Header Files, allow them to load CSS/JSS/Meta via JS Manager early enouhg
// NOTE: e_header.php should not output content, it should only register stuff!
// e_meta.php is more appropriate for outputting header content.
$e_headers = e107::pref('core','e_header_list');
if ($e_headers && is_array($e_headers))
{
foreach($e_headers as $val)
{
// no checks fore existing file - performance
e107_include(e_PLUGIN.$val."/e_header.php");
}
}
unset($e_headers);
echo e107::getUrl()->response()->renderMeta()."\n"; // render all the e107::meta() entries.
echo "<title>".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."</title>\n\n"; echo "<title>".(defined('e_PAGETITLE') ? e_PAGETITLE.' - ' : (defined('PAGE_NAME') ? PAGE_NAME.' - ' : "")).SITENAME."</title>\n\n";
@@ -169,18 +183,7 @@ if (/*!defined("PREVIEWTHEME") && */! (isset($no_core_css) && $no_core_css !==tr
$e_js->otherCSS('{e_WEB_CSS}e107.css'); $e_js->otherCSS('{e_WEB_CSS}e107.css');
} }
// Load Plugin Header Files, allow them to load CSS/JSS via JS Manager early enouhg
// NOTE: e_header.php should not output content, it should only register stuff! e_meta.php is more appropriate for outputting header content.
$e_headers = $e_pref->get('e_header_list');
if ($e_headers && is_array($e_headers))
{
foreach($e_headers as $val)
{
// no checks fore existing file - performance
e107_include(e_PLUGIN.$val."/e_header.php");
}
}
unset($e_headers);
// re-initalize in case globals are destroyed from $e_headers includes // re-initalize in case globals are destroyed from $e_headers includes
$e_js = e107::getJs(); $e_js = e107::getJs();

View File

@@ -3967,9 +3967,14 @@ class eResponse
if(null !== $name) if(null !== $name)
{ {
$key = (substr($name,0,3) == 'og:') ? 'property' : 'name'; // $key = (substr($name,0,3) == 'og:') ? 'property' : 'name';
$attr[$key] = $name; // $attr[$key] = $name;
$attr['property'] = $name; // giving both should be valid and avoid issues with FB and others.
$attr['name'] = $name;
} }
if(null !== $content) $attr['content'] = $content; if(null !== $content) $attr['content'] = $content;
if(!empty($extended)) if(!empty($extended))
{ {

View File

@@ -15,5 +15,4 @@ if(USER_AREA)
} }
?> ?>