WordPress.org

Make WordPress Core

Changeset 37204


Ignore:
Timestamp:
04/14/2016 04:18:54 AM (4 years ago)
Author:
jeremyfelt
Message:

Multisite: Fire a clean_site_cache action when a site's cache is cleared

Props spacedmonkey.
Fixes #36203.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-blogs.php

    r36894 r37204  
    455455    wp_cache_delete( 'get_id_from_blogname_' . trim( $blog->path, '/' ), 'blog-details' );
    456456    wp_cache_delete( $domain_path_key, 'blog-id-cache' );
     457
     458    /**
     459     * Fires immediately after a site has been removed from the object cache.
     460     *
     461     * @since 4.6.0
     462     *
     463     * @param int     $id Blog ID.
     464     * @param WP_Site $blog
     465     * @param string  $domain_path_key md5 hash of domain and path.
     466     */
     467    do_action( 'clean_site_cache', $blog_id, $blog, $domain_path_key );
    457468}
    458469
Note: See TracChangeset for help on using the changeset viewer.