Make WordPress Core

Ticket #35075: 35075.patch

File 35075.patch, 800 bytes (added by jason_the_adams, 9 years ago)
  • src/wp-includes/class-wp-comment-query.php

    diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
    index e30094d..15327dd 100644
    a b class WP_Comment_Query { 
    363363                }
    364364
    365365                // $args can include anything. Only use the args defined in the query_var_defaults to compute the key.
    366                 $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, array_keys( $this->query_var_defaults ) ) ) );
     366    $cache_keys = apply_filters('comment_cache_keys', array_keys( $this->query_vars ) );
     367                $key = md5( serialize( wp_array_slice_assoc( $this->query_vars, $cache_keys ) ) );
    367368                $last_changed = wp_cache_get( 'last_changed', 'comment' );
    368369                if ( ! $last_changed ) {
    369370                        $last_changed = microtime();