Commit b07c082d by Scott

Add schema.org Person microdata

Replace old hcard microformat
parent 9563e067
...@@ -689,8 +689,6 @@ ...@@ -689,8 +689,6 @@
if (isset($postuserid) && isset($usershtml[$postuserid])) { if (isset($postuserid) && isset($usershtml[$postuserid])) {
$whohtml=$usershtml[$postuserid]; $whohtml=$usershtml[$postuserid];
if ($microformats)
$whohtml='<span class="vcard author">'.$whohtml.'</span>';
} else { } else {
if (strlen($name)) if (strlen($name))
......
...@@ -460,9 +460,11 @@ ...@@ -460,9 +460,11 @@
$url = qa_path_html('user/'.$handle); $url = qa_path_html('user/'.$handle);
$favclass = $favorited ? ' qa-user-favorited' : ''; $favclass = $favorited ? ' qa-user-favorited' : '';
$mfclass = $microformats ? ' url fn entry-title nickname' : ''; $mfAttr = $microformats ? ' itemprop="name"' : '';
$mfPrefix = $microformats ? '<span itemprop="author" itemscope itemtype="http://schema.org/Person">' : '';
$mfSuffix = $microformats ? '</span>' : '';
return '<a href="'.$url.'" class="qa-user-link'.$favclass.$mfclass.'">'.qa_html($handle).'</a>'; return $mfPrefix . '<a href="'.$url.'" class="qa-user-link'.$favclass.'"'.$mfAttr.'>'.qa_html($handle).'</a>' . $mfSuffix;
} }
......
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