wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_{$adjacent}_post_sort › Filtr WordPress Hooks

Od6.9.0
Przestarzałyn/a
› apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order, p.ID $order LIMIT 1", $post, $order )
Parametry: (3)
  • () order_by The `ORDER BY` clause in the SQL.
    Wymagane: Tak
  • () post WP_Post object.
    Wymagane: Tak
  • () order Sort order. 'DESC' for previous post, 'ASC' for next.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters the ORDER BY clause in the SQL for an adjacent post query.

The dynamic portion of the hook name, `$adjacent`, refers to the type of adjacency, 'next' or 'previous'. Possible hook names include: - `get_next_post_sort` - `get_previous_post_sort`




Źródło

$sort = apply_filters( "get_{$adjacent}_post_sort", "ORDER BY p.post_date $order, p.ID $order LIMIT 1", $post, $order );