LLMS_Admin_Reporting::output_widget_range_filter( string $selected_period, string $tab, array $args = array() )
Output a range filter select.
Description Description
Used by overview data tabs
Parameters Parameters
- $selected_period
-
(string) (Required) Currently selected period.
- $tab
-
(string) (Required) Current tab name.
- $args
-
(array) (Optional) Additional args to be passed when form is submitted.
Default value: array()
Return Return
(void)
Source Source
File: includes/admin/reporting/class.llms.admin.reporting.php
public static function output_widget_range_filter( $selected_period, $tab, $args = array() ) { ?> <div class="llms-reporting-tab-filter"> <form action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>" method="GET"> <select class="llms-select2" name="period" onchange="this.form.submit();"> <?php foreach ( self::get_period_filters() as $val => $text ) : ?> <option value="<?php echo $val; ?>"<?php selected( $val, $selected_period ); ?>><?php echo $text; ?></option> <?php endforeach; ?> </select> <input type="hidden" name="page" value="llms-reporting"> <input type="hidden" name="tab" value="<?php echo $tab; ?>"> <?php foreach ( $args as $key => $val ) : ?> <input type="hidden" name="<?php echo $key; ?>" value="<?php echo $val; ?>"> <?php endforeach; ?> </form> </div> <?php }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.16.0 | Introduced. |