WPDev.one
Core Function
View Source on Trac ↗

get_post_embed_html()

get_post_embed_html( mixed $width, mixed $height, mixed $post = null )

Retrieves the embed code for a specific post.

Parameters 3 required

Name / Type Description
$width
int

The width for the response.

Required
$height
int

The height for the response.

Required
(int

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

Required

Return Value

((string)
| false) Embed code on success, false if post doesn't exist.

Function Information

Since Version
4.4.0
Source File
wp-includes/embed.php
Advertisement