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

Top ↑

Parameters Parameters


(string) (Required) Currently selected period.


(string) (Required) Current tab name.


(array) (Optional) Additional args to be passed when form is submitted.

Default value: array()

Top ↑

Return Return


Top ↑

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; ?>
				<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; ?>

Top ↑

Changelog Changelog

Version Description
3.16.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.