Available since: 3.0
searchwp_statistics_popular_days_{$days}
View Parameters »When viewing SearchWP statistics you’re shown data at various time intervals. Using this hook you can control the number of days used by SearchWP to calculate this data.
The primary use case for this hook is applicable when retrieving statistics is consuming available resources on the server, you can essentially ‘short circuit’ the problematic timeframe by filtering it to zero:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Disable SearchWP Popular Year searches stat. | |
add_filter( 'searchwp_statistics_popular_days_365', '__return_zero' ); |
Parameters
Parameter | Type | Description |
---|---|---|
$days |
Integer |
The number of days to consider for this statistics segment |