Changeset 40921 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 06/22/2017 03:18:18 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r40920 r40921 651 651 $term_ids = "'" . implode( "', '", $term_ids ) . "'"; 652 652 653 $object_ids = $wpdb->get_col("SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tt.term_id IN ($term_ids) ORDER BY tr.object_id $order"); 653 $sql = "SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ($taxonomies) AND tt.term_id IN ($term_ids) ORDER BY tr.object_id $order"; 654 655 $last_changed = wp_cache_get_last_changed( 'terms' ); 656 $cache_key = 'get_objects_in_term:' . md5( $sql ) . ":$last_changed"; 657 $cache = wp_cache_get( $cache_key, 'terms' ); 658 if ( false === $cache ) { 659 $object_ids = $wpdb->get_col( $sql ); 660 wp_cache_set( $cache_key, $object_ids, 'terms' ); 661 } else { 662 $object_ids = (array) $cache; 663 } 654 664 655 665 if ( ! $object_ids ){
Note: See TracChangeset
for help on using the changeset viewer.