Changeset 45603 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 07/05/2019 05:42:57 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r45590 r45603 1377 1377 $where = 't.term_id = %d'; 1378 1378 if ( ! empty( $taxonomy ) ) { 1379 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber 1379 1380 return $wpdb->get_row( $wpdb->prepare( $tax_select . $where . ' AND tt.taxonomy = %s', $term, $taxonomy ), ARRAY_A ); 1380 1381 } else { … … 1412 1413 } 1413 1414 1415 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare 1414 1416 $result = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $where $orderby $limit", $where_fields ) ); 1415 1417 if ( $result ) { … … 1417 1419 } 1418 1420 1421 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare 1419 1422 return $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $else_where $orderby $limit", $else_where_fields ) ); 1420 1423 } … … 3706 3709 3707 3710 if ( $object_types ) { 3711 // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders.QuotedDynamicPlaceholderGeneration 3708 3712 $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 ) ); 3709 3713 }
Note: See TracChangeset
for help on using the changeset viewer.