class views_handler_field_node_disqus_comments in Disqus 6
Field handler to present the number of Disqus comments on a node.
Hierarchy
- class \views_handler_field_node_disqus_comments extends \views_handler_field
Expanded class hierarchy of views_handler_field_node_disqus_comments
1 string reference to 'views_handler_field_node_disqus_comments'
- disqus_views_data_alter in ./
disqus.views.inc - Implementation of hook_views_data_alter.
File
- include/
views_handler_field_node_disqus_comments.inc, line 5
View source
class views_handler_field_node_disqus_comments extends views_handler_field {
function init(&$view, $options) {
parent::init($view, $options);
}
function query() {
// Override parent::query() without altering query.
}
/**
* When rendering the field.
*/
function render($values) {
// Ensure Disqus comments are available on the node user has access to edit this node.
$node = node_load($values->nid);
if (user_access('view disqus comments') && isset($node->disqus)) {
return theme('disqus_comments_num', $node->disqus['domain'], $node->disqus['url']);
}
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_handler_field_node_disqus_comments:: |
function | |||
views_handler_field_node_disqus_comments:: |
function | |||
views_handler_field_node_disqus_comments:: |
function | When rendering the field. |