get_{$adjacent}_post_join

get_{$adjacent}_post_join

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.9

apply_filters('get_{$adjacent}_post_join') is found 1 times:

  • /wp-includes/link-template.php line 1965
    	 * @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.
    	 */
    	$join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy, $post );
    
    	// Prepare the where clause for the adjacent post query.
    	$where_prepared = $wpdb->prepare( "WHERE (p.post_date $comparison_operator %s OR (p.post_date = %s AND p.ID $comparison_operator %d)) AND p.post_type = %s $where", $current_post_date, $current_post_date, $post->ID, $post->post_type ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- $comparison_operator is a string literal, either '<' or '>'.
    
    	/**
    	 * Filters the WHERE clause in the SQL for an adjacent post query.