WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 1379 | /** |
| 1380 | * Filter the ORDERBY clause of the terms query. |
| 1381 | * |
| 1382 | * @since 2.8.0 |
| 1383 | * |
| 1384 | * @param string $orderby ORDERBY clause of the terms query. |
| 1385 | * @param array $args An array of terms query arguments. |
| 1386 | * @param string|array $taxonomies A taxonomy or array of taxonomies. |
| 1387 | */ |
| 1388 | $orderby = apply_filters( 'get_terms_orderby', $orderby, $args, $taxonomies ); |
| 1389 | |
| 1390 | if ( !empty($orderby) ) |
| 1391 | $orderby = "ORDER BY $orderby"; |
| 1392 | else |
| 1393 | $order = ''; |
| 1394 | |
| 1395 | $order = strtoupper( $order ); |
| 1396 | if ( '' !== $order && !in_array( $order, array( 'ASC', 'DESC' ) ) ) |
| 1397 | $order = 'ASC'; |