функция
since 2.3.0
clean_comment_cache()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
clean_comment_cache( int|array $ids )
Описание
Удаляет комментарий из объектного кэша.
Параметры
$ids
int|array
обязательный
Идентификатор комментария или массив идентификаторов комментариев для удаления из кэша.
Исходный код
wp-includes/comment.php:3414
function clean_comment_cache( $ids ) {
$comment_ids = (array) $ids;
wp_cache_delete_multiple( $comment_ids, 'comment' );
foreach ( $comment_ids as $id ) {
/**
* Fires immediately after a comment has been removed from the object cache.
*
* @since 4.5.0
*
* @param int $id Comment ID.
*/
do_action( 'clean_comment_cache', $id );
}
wp_cache_set_comments_last_changed();
}
История изменений
| Версия | Описание |
|---|---|
| 2.3.0 | Introduced. |

