Inventory_Presser_REST::allow_orderby_rand( array $query_params )
Allow vehicles to be returned in a random order.
On This Page
Parameters Parameters
- $query_params
-
(array) (Required)
- $post_type
-
(WP_Post_Type) (Required)
Return Return
(array)
Source Source
File: includes/class-rest.php
public function allow_orderby_rand( $query_params ) { $query_params['orderby']['enum'][] = 'rand'; return $query_params; }
Expand full source codeCollapse full source codeView on Github