Function Reference: geodir_previous_next_post_join
Summary
Filters the JOIN clause in the SQL for an adjacent post query.
Global Values
- $plugin_prefix
- (string) (required) Geodirectory plugin table prefix.
- Default: None
Package
GeoDirectory
Parameters
- $join
- (string) (required) The JOIN clause in the SQL.
- Default: None
- $in_same_term
- (bool) (required) Whether post should be in a same taxonomy term.
- Default: None
- $excluded_terms
- (array) (required) Array of excluded term IDs.
- Default: None
- $taxonomy
- (string) (required) Taxonomy. Used to identify the term used when `$in_same_term` is true.
- Default: None
- $post
- (WP_Post) (required) WP_Post object.
- Default: None
Return Values
- (string)
- Filtered SQL JOIN clause.
Change Log
Since: 1.6.16
Source File
geodir_previous_next_post_join() is located in geodirectory_template_actions.php [Line: 3545]
Source Code
function geodir_previous_next_post_join( $join, $in_same_term, $excluded_terms, $taxonomy, $post ) { global $plugin_prefix; if ( !empty($post->post_type) && in_array( $post->post_type, geodir_get_posttypes() ) ) { $join .= " INNER JOIN " . $plugin_prefix . $post->post_type . "_detail AS gd ON gd.post_id = p.ID"; } return $join; }