Make WordPress Core

Ticket #35610: 35610.patch

File 35610.patch, 845 bytes (added by spacedmonkey, 9 years ago)
  • wp-includes/comment.php

    diff --git a/wp-includes/comment.php b/wp-includes/comment.php
    index 3d1439a..9b8141f 100644
    a b function xmlrpc_pingback_error( $ixr_error ) { 
    25192519 * Removes comment ID from the comment cache.
    25202520 *
    25212521 * @since 2.3.0
     2522 * @since 4.5.0 Added 'clean_comment_cache' action
    25222523 *
    25232524 * @param int|array $ids Comment ID or array of comment IDs to remove from cache
    25242525 */
    2525 function clean_comment_cache($ids) {
     2526function clean_comment_cache( $ids ) {
    25262527        foreach ( (array) $ids as $id ) {
    25272528                wp_cache_delete( $id, 'comment' );
     2529
     2530                /**
     2531                 * Fires once after each taxonomy's term cache has been cleaned.
     2532                 *
     2533                 * @since 4.5.0
     2534                 *
     2535                 * @param int  $id   Comment ID
     2536                 */
     2537                do_action( 'clean_comment_cache', $id );
    25282538        }
    25292539
    25302540        wp_cache_set( 'last_changed', microtime(), 'comment' );