Description

Filters date range selection in Dashboard Widget for Entries Chart.

Parameters

$options
(array) (Required) Date range options for the dashboard widget

Source

wpforms/src/Pro/Admin/DashboardWidget.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
 * @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' );

Snippet Reference: How to Customize Available Date Ranges for the WPForms Dashboard Widget