Changeset 31346 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 02/06/2015 02:01:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r31307 r31346 1227 1227 case 'slug': 1228 1228 case 'name': 1229 $terms = "'" . implode( "','", array_map( 'sanitize_title_for_query', $query['terms'] ) ) . "'"; 1229 foreach ( $query['terms'] as &$term ) { 1230 /* 1231 * 0 is the $term_id parameter. We don't have a term ID yet, but it doesn't 1232 * matter because `sanitize_term_field()` ignores the $term_id param when the 1233 * context is 'db'. 1234 */ 1235 $term = "'" . sanitize_term_field( $query['field'], $term, 0, $query['taxonomy'], 'db' ) . "'"; 1236 } 1237 1238 $terms = implode( ",", $query['terms'] ); 1239 1230 1240 $terms = $wpdb->get_col( " 1231 1241 SELECT $wpdb->term_taxonomy.$resulting_field
Note: See TracChangeset
for help on using the changeset viewer.