首页 WordPress函数大全 get_post_gallery()

get_post_gallery()

2020-05-01 / 4260阅 / 悠然

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

get_post_gallery( int|WP_Post $post, bool $html = true )

Check a specified post’s content for gallery and, if present, return the first

描述

参数

$post

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

$html

(bool)
(Optional)
Whether to return HTML or data. Default is true.

Default value: true

返回

(string|array) Gallery data and srcs parsed from the expanded shortcode.

大家谈论
    我的见解