LLMS_REST_Posts_Controller::prepare_items_query( array $prepared_args = array(), WP_REST_Request $request = null )

Determines the allowed query_vars for a get_items() response and prepares them for WP_Query.


Parameters Parameters

$prepared_args

(array) (Optional) Prepared WP_Query arguments.

Default value: array()

$request

(WP_REST_Request) (Optional) Full details about the request.

Default value: null


Top ↑

Return Return

(array) Items query arguments.


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php

	}

	/**
	 * Determines the allowed query_vars for a get_items() response and prepares
	 * them for WP_Query.
	 *
	 * @since 1.0.0-beta.1
	 *
	 * @param array           $prepared_args Optional. Prepared WP_Query arguments. Default empty array.
	 * @param WP_REST_Request $request       Optional. Full details about the request.
	 * @return array Items query arguments.
	 */
	protected function prepare_items_query( $prepared_args = array(), $request = null ) {

		$query_args = array();

		foreach ( $prepared_args as $key => $value ) {
			$query_args[ $key ] = $value;
		}


Top ↑

Changelog 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.