get_post_galleries_images()
get_post_galleries_images( int|WP_Post $post )
从文章内容的库中检索图像src(如果存在)
Retrieve the image srcs from galleries from a post’s content, if present
说明(Description)
另见函数 get_post_galleries()
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$post | (int | WP_Post) | 可选 | Post ID或WP_Post对象。默认值为全局$post。 |
返回(Return)
(array)一个列表列表,每个列表包含解析的图像src。从扩展的短代码
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.6.0 | wp-includes/media.php:4254 | 0 | 2 |
笔记(Notes)
一个简单的例子,说明如何将原始图像url附加到任何至少有一个库的文章或页面的内容。
get_post_galleries_images() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_post_galleries_images/