LLMS_Student_Query::get_students()

Retrieve an array of LLMS_Students for the given set of students returned by the query


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.student.query.php

	public function get_students() {

		$students = array();
		$results  = $this->get_results();

		if ( $results ) {

			foreach ( $results as $result ) {
				$students[] = new LLMS_Student( $result->id );
			}
		}

		if ( $this->get( 'suppress_filters' ) ) {
			return $students;
		}

		/**
		 * Filters the list of students
		 *
		 * @since Unknown
		 * @since 4.10.2 Pass this query instance as second parameter.
		 *
		 * @param LLMS_Student[]     $students      Array of LLMS_Student instances.
		 * @param LLMS_Student_Query $student_query Instance of LLMS_Student_Query.
		 */
		return apply_filters( 'llms_student_query_get_students', $students, $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.10.2 Drop usage of this->get_filter( 'get_students' ) in favor of 'llms_student_query_get_students'.
3.8.0 Unknown.
3.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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