function rdf_comment_load

rdf_comment_load($comments)

Implements hook_comment_load().

File

modules/rdf/rdf.module, line 419
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));
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!rdf!rdf.module/function/rdf_comment_load/7.x