Filter: ep_set_sort

apply_filters( 'ep_set_sort', $sort, $order ) → {array}

Filter the ES query order (sort clause)

This filter is used in searches if orderby is not set in the WP_Query args. The default value is:

$default_sort = array( array( '_score' => array( 'order' => $order, ), ), );

Parameters:
Name Type Description
$sort array

Default sort.

$order string

Order direction

Since:
  • 3.6.3
Source:
Returns:

New default

Type
array