posts_orderby
Filters the ORDER BY clause of the query.
Использование
add_filter( 'posts_orderby', 'wp_kama_posts_orderby_filter' ); /** * Function for `posts_orderby` filter-hook. * * @param string $orderby The ORDER BY clause of the query. * * @return string */ function wp_kama_posts_orderby_filter( $orderby ){ // filter... return $orderby; }
- $orderby(строка)
- The ORDER BY clause of the query.
Список изменений
С версии 1.5.1 | Введена. |
Где вызывается хук
posts_orderby
wp-includes/class-wp-query.php 2902
$orderby = apply_filters_ref_array( 'posts_orderby', array( $orderby, &$this ) );