Commit 8289650e authored by Francesco Iannuzzelli's avatar Francesco Iannuzzelli

#24 Fix structured data errors

parent d7194daa
......@@ -7669,11 +7669,18 @@ class Layout
}
}
}
} else {
$ld['image'] = "$cdn/graphics/peacelink.jpg";
}
$ld['datePublished'] = $article['date_iso8601'];
$ld['dateModified'] = $article['date_iso8601'];
if($article['show_author']=='1' && isset($article['author']['name']) && $article['author']['name']!='') {
$ld['author'] = array('@type'=>'Person','name'=>$article['author']['name']);
$ld['author'] = array('@type'=>'Organization','name'=>'PeaceLink');
if($article['show_author']=='1') {
if(isset($article['author']['name']) && $article['author']['name']!='') {
$ld['author'] = array('@type'=>'Person','name'=>$article['author']['name']);
} else if(isset($article['source']['description']) && $article['source']['description']['xvalue']!='') {
$ld['author'] = array('@type'=>'Organization','name'=>$article['source']['description']['xvalue']);
}
}
$ld['publisher'] = $org;
if($article['subhead']['xvalue']!='') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment