clean_attachment_cache
云策文档标注
概述
clean_attachment_cache 是一个 WordPress 动作钩子,在清理指定附件的缓存后触发,主要用于开发者处理附件缓存清理后的相关操作。
关键要点
- 钩子名称:clean_attachment_cache
- 触发时机:在清理指定附件的缓存后执行
- 参数:$id(整数类型,表示附件 ID)
- 相关函数:clean_attachment_cache() 在 wp-includes/post.php 中定义,用于清理附件缓存
- 引入版本:WordPress 3.0.0
原文内容
Fires after the given attachment’s cache is cleaned.
Parameters
$idint-
Attachment ID.
Source
do_action( 'clean_attachment_cache', $id );
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |