get_post_embed_html()
get_post_embed_html( int $width, int $height, int|WP_Post $post = null )
检索特定文章的嵌入代码。
Retrieves the embed code for a specific post.
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$width | (int) | 必需 | 响应的宽度。 |
$height | (int) | 必需 | 响应的高度。 |
$post | (int | WP_Post) | 可选 | Post ID或对象。默认值为全局$post。 |
返回(Return)
(string|false)成功时嵌入代码,如果post不存在则为false。
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.4.0 | wp-includes/embed.php:440 | 2 | 11 |
get_post_embed_html() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_post_embed_html/