Changeset 26510 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 12/01/2013 11:59:13 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/taxonomy.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r26028 r26510 2047 2047 if ( 'all' == $fields || 'all_with_object_id' == $fields ) { 2048 2048 $_terms = $wpdb->get_results( $query ); 2049 foreach ( $_terms as &$term ) 2050 $term = sanitize_term( $term, $taxonomy, 'raw' ); 2049 foreach ( $_terms as $key => $term ) { 2050 $_terms[$key] = sanitize_term( $term, $taxonomy, 'raw' ); 2051 } 2051 2052 $terms = array_merge( $terms, $_terms ); 2052 2053 update_term_cache( $terms ); … … 2054 2055 $_terms = $wpdb->get_col( $query ); 2055 2056 $_field = ( 'ids' == $fields ) ? 'term_id' : 'name'; 2056 foreach ( $_terms as &$term ) 2057 $term = sanitize_term_field( $_field, $term, $term, $taxonomy, 'raw' ); 2057 foreach ( $_terms as $key => $term ) { 2058 $_terms[$key] = sanitize_term_field( $_field, $term, $term, $taxonomy, 'raw' ); 2059 } 2058 2060 $terms = array_merge( $terms, $_terms ); 2059 2061 } else if ( 'tt_ids' == $fields ) { 2060 2062 $terms = $wpdb->get_col("SELECT tr.term_taxonomy_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN ($object_ids) AND tt.taxonomy IN ($taxonomies) $orderby $order"); 2061 foreach ( $terms as &$tt_id ) 2062 $tt_id = sanitize_term_field( 'term_taxonomy_id', $tt_id, 0, $taxonomy, 'raw' ); // 0 should be the term id, however is not needed when using raw context. 2063 foreach ( $terms as $key => $tt_id ) { 2064 $terms[$key] = sanitize_term_field( 'term_taxonomy_id', $tt_id, 0, $taxonomy, 'raw' ); // 0 should be the term id, however is not needed when using raw context. 2065 } 2063 2066 } 2064 2067
Note: See TracChangeset
for help on using the changeset viewer.