LLMS_REST_Students_Controller::get_objects_query( array $prepared, WP_REST_Request $request )

Retrieve a query object based on arguments from a get_items() (collection) request.

Parameters Parameters


(array) (Required) Array of collection arguments.


(WP_REST_Request) (Required) Request object.

Top ↑

Return Return


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-controller.php


		$query = parent::get_objects_query( $prepared, $request );

		if ( $remove ) {

			$this->prepared_query_args = array();

			remove_action( 'pre_user_query', array( $this, 'get_objects_query_pre' ) );

		return $query;


	 * Callback for WP_User_Query "pre_user_query" action.
	 * Adds select fields and a having clause to check against `enrolled_in` and `enrolled_not_in` collection query args.
	 * @since 1.0.0-beta.1
	 * @link https://developer.wordpress.org/reference/hooks/pre_user_query/

Top ↑

Changelog Changelog

Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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