apply_filters( 'RML/Tree/Orderby', $orders ) → {Array.<object>}
Add an available order criterium to the tree. If you pass user input to the SQL Order please be sure the values are escaped!
Parameters:
Name | Type | Description |
---|---|---|
$orders |
Array.<object> | The available orders |
- Since:
- 4.4.0
Returns:
- Type
- Array.<object>
Example
$orders["id_asc"] = [
"label" => __("Order by ID ascending", RML_TD),
"sqlOrder" => "rml.ID"
)