1. 首页
  2. WordPress 函数手册

get_post_gallery_images()

get_post_gallery_images( int|WP_Post $post )

检查文章的库内容并返回第一个找到的库的图像srcs
Checks a post’s content for galleries and return the image srcs for the first found gallery

目录锚点:#说明#参数#返回#源码#笔记


说明(Description)

另见函数 get_post_gallery()


参数(Parameters)

参数 类型 必填 说明
$post (int | WP_Post) 可选 Post ID或WP_Post对象。默认值为全局$post。

返回(Return)

(string[])按顺序排列的库图像src的列表。


源码(Source)


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

笔记(Notes)

例子

get_post_gallery_images() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_post_gallery_images/