Make WordPress Core


Ignore:
Timestamp:
09/19/2015 05:40:22 AM (9 years ago)
Author:
wonderboymusic
Message:

Add a 'clean_user_cache' action at the end of clean_user_cache(). This is mighty similar to clean_post_cache().

Props elliott-stocks, wonderboymusic.
Fixes #31918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user-functions.php

    r34266 r34318  
    10911091 *
    10921092 * @since 3.0.0
     1093 * @since 4.4.0 'clean_user_cache' action was added.
    10931094 *
    10941095 * @param WP_User|int $user User object or ID to be cleaned from the cache
     
    11051106    wp_cache_delete( $user->user_email, 'useremail' );
    11061107    wp_cache_delete( $user->user_nicename, 'userslugs' );
     1108
     1109    /**
     1110     * Fires immediately after the given user's cache is cleaned.
     1111     *
     1112     * @since 4.4.0
     1113     *
     1114     * @param int     $user_id User ID.
     1115     * @param WP_User $user    User object.
     1116     */
     1117    do_action( 'clean_user_cache', $user->ID, $user );
    11071118}
    11081119
Note: See TracChangeset for help on using the changeset viewer.