diff --git wp-includes/query.php wp-includes/query.php
index f47a860a..c22136d 100644
|
|
class WP_Query { |
2745 | 2745 | |
2746 | 2746 | $this->post_count = count($this->posts); |
2747 | 2747 | |
2748 | | // Sanitize before caching so it'll only get done once |
2749 | | for ( $i = 0; $i < $this->post_count; $i++ ) { |
2750 | | $this->posts[$i] = sanitize_post($this->posts[$i], 'raw'); |
2751 | | } |
| 2748 | if ( $q['cache_results'] ) { |
| 2749 | // Sanitize before caching so it'll only get done once |
| 2750 | for ( $i = 0; $i < $this->post_count; $i++ ) { |
| 2751 | $this->posts[$i] = sanitize_post($this->posts[$i], 'raw'); |
| 2752 | } |
2752 | 2753 | |
2753 | | if ( $q['cache_results'] ) |
2754 | 2754 | update_post_caches($this->posts, $post_type, $q['update_post_term_cache'], $q['update_post_meta_cache']); |
| 2755 | } |
2755 | 2756 | |
2756 | 2757 | if ( $this->post_count > 0 ) { |
2757 | 2758 | $this->post = $this->posts[0]; |