Filter
rpress_report_date_options
On this page
Filters the date range choices of the report date selector.
Runs when the report graph controls build the range dropdown. Keys are range IDs such as today, last_30_days or other; values are the labels. Custom IDs also need to be handled by rpress_get_report_dates or rpress_report_dates to produce dates.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$date_options | array | Array of range ID => label. |
Return value#
array. The range ID => label array.
Example#
function my_trim_date_options( $date_options ) {
unset( $date_options['last_quarter'], $date_options['this_quarter'] );
return $date_options;
}
add_filter( 'rpress_report_date_options', 'my_trim_date_options', 10, 1 );
Source#
Applied in:
includes/admin/reporting/graphing.php(line 616), inrpress_reports_graph_controls()
See also#
Was this page helpful?
