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



get_{$adjacent}_post_where ›

Od4.4.0
Przestarzałyn/a
apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type )
Parametry: (5)
  • (string) $where The `WHERE` clause in the SQL.
    Wymagane: Nie
    Domyślny: %s {$where}", $current_post_date, $post->post_type)
  • (bool) $in_same_term Whether post should be in a same taxonomy term.
    Wymagane: Tak
  • (array) $excluded_terms Array of excluded term IDs.
    Wymagane: Tak
  • (string) $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true.
    Wymagane: Tak
  • (WP_Post) $post WP_Post object.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters the WHERE 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'.





Źródło

$where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms, $taxonomy, $post );