Recent

tptn_get_sitewide_countfilter

tptn_get_sitewide_count

Filters the view count for a site-wide context.

Site-wide contexts are a Pro feature; the free plugin always returns 0.

Type: filter
Since: 4.5.0
Source: includes/class-database.php line 138

Parameters

Type Name Description
int $count The site-wide count.
string $context Site-wide context key.
int|null $blog_id Blog ID, or null for the current blog.
bool $daily Whether a daily count was requested.
array $date_range Date range used for daily counts.

Usage

add_filter( 'tptn_get_sitewide_count', function($count, $context, $blog_id, $daily, $date_range) {
    // ...
    return $count;
} );