WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/2019 05:42:57 AM (19 months ago)
Author:
pento
Message:

Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r45590 r45603  
    13771377        $where = 't.term_id = %d';
    13781378        if ( ! empty( $taxonomy ) ) {
     1379            // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber
    13791380            return $wpdb->get_row( $wpdb->prepare( $tax_select . $where . ' AND tt.taxonomy = %s', $term, $taxonomy ), ARRAY_A );
    13801381        } else {
     
    14121413    }
    14131414
     1415    // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
    14141416    $result = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $where $orderby $limit", $where_fields ) );
    14151417    if ( $result ) {
     
    14171419    }
    14181420
     1421    // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare
    14191422    return $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $else_where $orderby $limit", $else_where_fields ) );
    14201423}
     
    37063709
    37073710        if ( $object_types ) {
     3711            // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration
    37083712            $count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type IN ('" . implode( "', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );
    37093713        }
Note: See TracChangeset for help on using the changeset viewer.