clean_page_cache
Action HookDescription
Fires immediately after the given page's cache is cleaned.Hook Information
File Location |
wp-includes/post.php
View on GitHub
|
Hook Type | Action |
Line Number | 7672 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$post_id
|
Post ID. |
Usage Examples
Basic Usage
<?php
// Hook into clean_page_cache
add_action('clean_page_cache', 'my_custom_function', 10, 1);
function my_custom_function($post_id) {
// Your custom code here
}
Source Code Context
wp-includes/post.php:7672
- How this hook is used in WordPress core
<?php
7667 *
7668 * @since 2.5.0
7669 *
7670 * @param int $post_id Post ID.
7671 */
7672 do_action( 'clean_page_cache', $post->ID );
7673 }
7674
7675 wp_cache_set_posts_last_changed();
7676 }
7677
PHP Documentation
<?php
/**
* Fires immediately after the given page's cache is cleaned.
*
* @since 2.5.0
*
* @param int $post_id Post ID.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/post.php
Related Hooks
Related hooks will be displayed here in future updates.