You are here

public static function ShareaholicUtilities::total_comments in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

Same name and namespace in other branches
  1. 8 utilities.php \ShareaholicUtilities::total_comments()

Get the total number of comments for this site

Return value

integer The total number of comments

1 call to ShareaholicUtilities::total_comments()
ShareaholicUtilities::get_stats in ./utilities.php
Get the stats for this website Stats include: total number of pages by type, total comments, total users

File

./utilities.php, line 747

Class

ShareaholicUtilities

Code

public static function total_comments() {
  if (!db_table_exists('comment')) {
    return array();
  }
  return db_query("SELECT count(cid) FROM {comment}")
    ->fetchField();
}