1. 首页
  2. WordPress钩子手册

get_attached_media

apply_filters( ‘get_attached_media’, WP_Post[] $children, string $type, WP_Post $post )

过滤钩子:过滤附加到给定帖子的媒体列表。
Filter Hook: Filters the list of media attached to the given post.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$children (WP_Post[]) 附加到给定post的媒体数组。
$type (string) 所需媒体的Mime类型。
$post (WP_Post) Post对象。

源码(Source)


更新版本 源码位置 使用 被使用
3.6.0 wp-includes/media.php:4104 1 0

get_attached_media 为WP2原创文章,链接:https://www.wp2.cn/hook/get_attached_media/