Make WordPress Core

Ticket #54769: 54769.diff

File 54769.diff, 2.0 KB (added by costdev, 4 years ago)

Add missing AS keywords to src/wp-includes/link-template.php and src/wp-includes/taxonomy.php.

  • src/wp-includes/link-template.php

    diff --git a/src/wp-includes/link-template.php b/src/wp-includes/link-template.php
    index 904ec50749..b1ae4e2a35 100644
    a b function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo 
    18371837
    18381838        if ( $in_same_term || ! empty( $excluded_terms ) ) {
    18391839                if ( $in_same_term ) {
    1840                         $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";
     1840                        $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";
    18411841                        $where .= $wpdb->prepare( 'AND tt.taxonomy = %s', $taxonomy );
    18421842
    18431843                        if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) ) {
  • src/wp-includes/taxonomy.php

    diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php
    index d3d13b5ebd..fbfef11ce8 100644
    a b function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    25332533         * and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks
    25342534         * are not fired.
    25352535         */
    2536         $duplicate_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.term_id, t.slug, tt.term_taxonomy_id, tt.taxonomy FROM $wpdb->terms t INNER JOIN $wpdb->term_taxonomy tt ON ( tt.term_id = t.term_id ) WHERE t.slug = %s AND tt.parent = %d AND tt.taxonomy = %s AND t.term_id < %d AND tt.term_taxonomy_id != %d", $slug, $parent, $taxonomy, $term_id, $tt_id ) );
     2536        $duplicate_term = $wpdb->get_row( $wpdb->prepare( "SELECT t.term_id, t.slug, tt.term_taxonomy_id, tt.taxonomy FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON ( tt.term_id = t.term_id ) WHERE t.slug = %s AND tt.parent = %d AND tt.taxonomy = %s AND t.term_id < %d AND tt.term_taxonomy_id != %d", $slug, $parent, $taxonomy, $term_id, $tt_id ) );
    25372537
    25382538        /**
    25392539         * Filters the duplicate term check that takes place during term creation.