clean_comment_cache
Action HookDescription
Fires immediately after a comment has been removed from the object cache.Hook Information
File Location |
wp-includes/comment.php
View on GitHub
|
Hook Type | Action |
Line Number | 3359 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$id
|
Comment ID. |
Usage Examples
Basic Usage
<?php
// Hook into clean_comment_cache
add_action('clean_comment_cache', 'my_custom_function', 10, 1);
function my_custom_function($id) {
// Your custom code here
}
Source Code Context
wp-includes/comment.php:3359
- How this hook is used in WordPress core
<?php
3354 *
3355 * @since 4.5.0
3356 *
3357 * @param int $id Comment ID.
3358 */
3359 do_action( 'clean_comment_cache', $id );
3360 }
3361
3362 wp_cache_set_comments_last_changed();
3363 }
3364
PHP Documentation
<?php
/**
* Fires immediately after a comment has been removed from the object cache.
*
* @since 4.5.0
*
* @param int $id Comment ID.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/comment.php
Related Hooks
Related hooks will be displayed here in future updates.