clean_post_cache
Fires immediately after the given post's cache is cleaned.
Usage
add_action( 'clean_post_cache', 'wp_kama_clean_post_cache_action', 10, 2 );
/**
* Function for `clean_post_cache` action-hook.
*
* @param int $post_id Post ID.
* @param WP_Post $post Post object.
*
* @return void
*/
function wp_kama_clean_post_cache_action( $post_id, $post ){
// action...
}
- $post_id(int)
- Post ID.
- $post(WP_Post)
- Post object.
Changelog
| Since 2.5.0 | Introduced. |
Where the hook is called
clean_post_cache
wp-includes/post.php 7747
do_action( 'clean_post_cache', $post->ID, $post );