Changeset 34599 for trunk/src/wp-includes/class-wp-comment-query.php
- Timestamp:
- 09/26/2015 04:01:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-comment-query.php
r34561 r34599 139 139 * @since 4.4.0 `$parent__in` and `$parent__not_in` were added. 140 140 * @since 4.4.0 Order by `comment__in` was added. `$update_comment_meta_cache`, `$no_found_rows`, 141 * and `$hierarchical` were added.141 * `$hierarchical`, and `$update_comment_post_cache` were added. 142 142 * @access public 143 143 * … … 239 239 * @type bool $update_comment_meta_cache Whether to prime the metadata cache for found comments. 240 240 * Default true. 241 * @type bool $update_comment_post_cache Whether to prime the cache for comment posts. 242 * Default false. 241 243 * } 242 244 */ … … 282 284 'hierarchical' => false, 283 285 'update_comment_meta_cache' => true, 286 'update_comment_post_cache' => false, 284 287 ); 285 288 … … 413 416 $_comments[] = $_comment; 414 417 } 418 } 419 420 // Prime comment post caches. 421 if ( $this->query_vars['update_comment_post_cache'] ) { 422 $comment_post_ids = array(); 423 foreach ( $_comments as $_comment ) { 424 $comment_post_ids[] = $_comment->comment_post_ID; 425 } 426 427 _prime_post_caches( $comment_post_ids, false, false ); 415 428 } 416 429
Note: See TracChangeset
for help on using the changeset viewer.