comment_get_display_page
function comment_get_display_page
comment_get_display_page($cid, $node_type)
Return the page number for a comment.
Finds the correct page number for a comment taking into account display and paging settings.
Parameters
$cid: The comment ID.
$node_type: The node type the comment is attached to.
Return value
The page number.
File
- modules/comment/comment.module, line 1811
- Enables users to comment on published content.
Code
function comment_get_display_page($cid, $node_type) { $ordinal = comment_get_display_ordinal($cid, $node_type); $comments_per_page = variable_get('comment_default_per_page_' . $node_type, 50); return floor($ordinal / $comments_per_page); }
© 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!comment!comment.module/function/comment_get_display_page/7.x