首页 WordPress函数大全 get_attached_media()

get_attached_media()

2020-05-01 / 4703阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_attached_media( string $type, int|WP_Post $post )

Retrieves media attached to the passed post.

描述

参数

$type

(string)
(Required)
Mime type.

$post

(int|WP_Post)
(Optional)
Post ID or WP_Post object. Default is global $post.

返回

(WP_Post[]) Array of media attached to the given post.

大家谈论
    我的见解