Filters the JOIN 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_join` - `get_previous_post_join`
$join, $in_same_term, $excluded_terms, $taxonomy, $post
Sortie :
@param string $join The JOIN clause in the SQL. @param bool $in_same_term Whether post should be in the same taxonomy term. @param int[]|string $excluded_terms Array of excluded term IDs. Empty string if none were provided. @param string $taxonomy Taxonomy. Used to identify the term used when `$in_same_term` is true. @param WP_Post $post WP_Post object.
// Modifier la valeur avec le filtre 'get_{$adjacent}_post_join'
add_filter('get_{$adjacent}_post_join', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($join) {
// Modifier la valeur
return $join;
}
Chargement des actualités...