crp_query_posts_orderby
Filters the posts_orderby of CRP_Query after processing and before returning.
Type: filter
Since: 3.2.0
Source: includes/class-crp-core-query.php line 1076
Changelog
| Version | Description |
|---|---|
4.0.0 |
Added $instance |
3.2.0 |
Introduced. |
Parameters
| Type | Name | Description |
|---|---|---|
string |
$orderby |
The SELECT clause of the query. |
\WP_Query|\CRP_Query |
$query |
The WP_Query or CRP_Query instance. |
CRP_Core_Query |
$instance |
The CRP_Core_Query instance. |
Usage
add_filter( 'crp_query_posts_orderby', function($orderby, $query, $instance) {
// ...
return $orderby;
} );