LLMS_REST_Posts_Controller::prepare_items_query_orderby_mappings( array $query_args, WP_REST_Request $request )
Map to proper WP_Query orderby param.
Parameters Parameters
- $query_args
-
(array) (Required) WP_Query arguments.
- $request
-
(WP_REST_Request) (Required) Full details about the request.
Return Return
(array) Query arguments.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-posts-controller.php
return $query_args; } /** * Map to proper WP_Query orderby param. * * @since 1.0.0-beta.1 * * @param array $query_args WP_Query arguments. * @param WP_REST_Request $request Full details about the request. * @return array Query arguments. */ protected function prepare_items_query_orderby_mappings( $query_args, $request ) { // Map to proper WP_Query orderby param. if ( isset( $query_args['orderby'] ) && isset( $request['orderby'] ) ) { $orderby_mappings = array( 'id' => 'ID',
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |