Habari\Comments::count_by_ip PHP Method

count_by_ip() public static method

returns the number of comments from the specified IP address
public static count_by_ip ( string $ip = '', integer | string $status = 'approved' ) : integer
$ip string an IP address
$status integer | string A comment status value, or false to not filter on status (default: 'approved')
return integer a count of the comments from the specified IP address
    public static function count_by_ip($ip = '', $status = 'approved')
    {
        $params = array('ip' => $ip, 'count' => 'ip');
        if (false !== $status) {
            $params['status'] = $status;
        }
        return self::get($params);
    }