add_attachment
do_action( ‘add_attachment’, int $post_ID )
动作钩子::添加附件后触发。
Action Hook: Fires once an attachment has been added.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$post_ID | (int) | 附件ID。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.0.0 | wp-includes/post.php:4077 | 1 | 0 |
add_attachment 为WP2原创文章,链接:https://www.wp2.cn/hook/add_attachment/