clean_post_cache
Fires immediately after the given post's cache is cleaned.
Description
Parameters (2)
- 0. $post_id (int)
- The post id.
- 1. $post (WP_Post)
- Post object.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'clean_post_cache', $post_id, $post );
- The following example is for adding a hook callback.
- // define the clean_post_cache callback
- function action_clean_post_cache( $post_id, $post ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'clean_post_cache', 'action_clean_post_cache', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'clean_post_cache', 'action_clean_post_cache', 10, 2 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/post.php
- do_action( 'clean_post_cache', $post->ID, $post );