Make WordPress Core

Ticket #11566: comment.php.diff

File comment.php.diff, 495 bytes (added by sirzooro, 15 years ago)
  • comment.php

    old new  
    17851785 * @param int|array $id Comment ID or array of comment IDs to remove from cache
    17861786 */
    17871787function clean_comment_cache($ids) {
    1788         foreach ( (array) $ids as $id )
     1788        foreach ( (array) $ids as $id ) {
    17891789                wp_cache_delete($id, 'comment');
     1790                if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $id) ) {
     1791                        unset($GLOBALS['comment']);
     1792                }
     1793        }
    17901794}
    17911795
    17921796/**