1. 首页
  2. WordPress 函数手册

get_post_embed_url()

get_post_embed_url( int|WP_Post $post = null )

检索在iframe中嵌入特定文章的URL。
Retrieves the URL to embed a specific post in an iframe.

目录锚点:#参数#返回#源码


参数(Parameters)

参数 类型 必填 说明
$post (int | WP_Post) 可选 Post ID或对象。默认为当前帖子。

返回(Return)

(string|false)post成功时嵌入URL,如果post不存在则为false。


源码(Source)


更新版本 源码位置 使用 被使用
4.4.0 wp-includes/embed.php:369 1 function 12

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