Description
The wpforms_dash_widget_timespan_options
filters the date range selection in Dashboard Widget for Entries Chart.
Parameters
- $options
- (array) (Required) Date range options for the dashboard widget
Source
wpforms/src/Admin/Dashboard/Widget.php
More Information
The wpforms_dash_widget_timespan_options
filter provides a date range dropdown for the Entry Charts date range. Defaults to 7 days and 30 days.
Examples
/** * Filters date range selection in Dashboard Widget. * * @link https://wpforms.com/developers/wpforms_dash_widget_timespan_options/ * * @param array $options Date range options. * * @return array */ function wpf_dev_dash_widget_timespan_options( $options ) { $options[] = 90; return $options; } add_filter( 'wpforms_dash_widget_timespan_options', 'wpf_dev_dash_widget_timespan_options', 10, 1 );
Related
Article Reference: How to Customize Available Date Ranges for the WPForms Dashboard Widget