mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Database: Add missing AS after INNER JOIN in some queries.
While `AS` is an optional keyword in SQL, it is commonly considered best practice to include it for better readability and compatibility. This also makes the queries more consistent with other queries using aliases in core. Follow-up to [6359], [30238]. Props costdev, domainsupport. Fixes #54769. git-svn-id: https://develop.svn.wordpress.org/trunk@52553 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1837,7 +1837,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
|
||||
|
||||
if ( $in_same_term || ! empty( $excluded_terms ) ) {
|
||||
if ( $in_same_term ) {
|
||||
$join .= " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
|
||||
$join .= " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
|
||||
$where .= $wpdb->prepare( 'AND tt.taxonomy = %s', $taxonomy );
|
||||
|
||||
if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) ) {
|
||||
|
||||
Reference in New Issue
Block a user