LLMS_Table_Students::get_table_filters_html()

Get HTML for the filters displayed in the head of the table


Description Description

This overrides the LLMS_Admin_Table method.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/admin/reporting/tables/llms.table.students.php

	public function get_table_filters_html() {
		$select_id       = sprintf( '%1$s-%2$s-filter', $this->id, 'course-membership' );
		$additional_data = array();
		// Limit Course/Membership results based on instructor access.
		if ( ! current_user_can( 'view_others_lifterlms_reports' ) && current_user_can( 'view_lifterlms_reports' ) ) {
			$instructor = llms_get_instructor();
			if ( $instructor ) {
				$additional_data[] = sprintf( 'data-instructor_id="%d"', $instructor->get( 'id' ) );
			}
		}
		$additional_data = implode( ' ', $additional_data );
		ob_start();
		?>
		<div class="llms-table-filters">
			<div class="llms-table-filter-wrap">
				<label class="screen-reader-text" for="<?php echo $select_id; ?>">
					<?php _e( 'Choose Course/Membership', 'lifterlms' ); ?>
				</label>
				<select data-post-type="llms_membership,course" class="llms-posts-select2 llms-table-filter" id="<?php echo $select_id; ?>" name="course_membership" style="min-width:200px;max-width:500px;"<?php echo $additional_data; ?>></select>
			</div>
		</div>
		<?php
		return ob_get_clean();
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.37.2 Unknown.
3.31.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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