Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Table_Students::get_query_args()

Retrieve an array of query arguments to pass to the LLMS_Student_Query


Return Return

(array)


Top ↑

Source Source

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

	private function get_query_args() {

		$query_args = array(
			'page'     => $this->get_current_page(),
			'post_id'  => array(),
			'per_page' => $this->get_per_page(),
			'sort'     => $this->get_sort(),
		);

		if ( 'status' === $this->get_filterby() && 'any' !== $this->get_filter() ) {

			$query_args['statuses'] = array( $this->get_filter() );

		} elseif ( 'course_membership' === $this->get_filterby() && '' !== $this->get_filter() ) {

			$query_args['post_id']  = absint( $this->get_filter() );
			$query_args['statuses'] = 'enrolled';

		}

		if ( $this->get_search() ) {
			$query_args['search'] = $this->get_search();
		}

		return $query_args;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.31.0 Added logic to setup the query args in order to allow the filtering by Course or Membership.
3.28.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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