function rdf_comment_load
7.x rdf.module | rdf_comment_load($comments) |
Implements hook_comment_load().
File
- drupal-7.x/
modules/ rdf/ rdf.module, line 400 - Enables semantically enriched output for Drupal sites in the form of RDFa.
Code
function rdf_comment_load($comments) {
foreach ($comments as $comment) {
// Pages with many comments can show poor performance. This information
// isn't needed until rdf_preprocess_comment() is called, but set it here
// to optimize performance for websites that implement an entity cache.
$comment->rdf_data['date'] = rdf_rdfa_attributes($comment->rdf_mapping['created'], $comment->created);
$comment->rdf_data['nid_uri'] = url('node/' . $comment->nid);
if ($comment->pid) {
$comment->rdf_data['pid_uri'] = url('comment/' . $comment->pid, array('fragment' => 'comment-' . $comment->pid));
}
}
}