function rdf_comment_load

Implements hook_comment_load().

File

modules/rdf/rdf.module, line 419

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,
            ));
        }
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.