Title: embed_html
Published: December 9, 2015
Last modified: February 24, 2026

---

# apply_filters( ’embed_html’, string $output, WP_Post $post, int $width, int $height )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#wp--skip-link--target)

Filters the embed HTML output for a given post.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#parameters)󠁿

 `$output`string

The default iframe tag to display embedded content.

`$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)

Current post object.

`$width`int

Width of the response.

`$height`int

Height of the response.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'embed_html', $output, $post, $width, $height );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/embed.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/embed.php#L547)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/embed.php#L547-L547)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#related)󠁿

| Used by | Description | 
| [get_post_embed_html()](https://developer.wordpress.org/reference/functions/get_post_embed_html/)`wp-includes/embed.php` |

Retrieves the embed code for a specific post.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/embed_html/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.4.0](https://developer.wordpress.org/reference/since/4.4.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fembed_html%2F)
before being able to contribute a note or feedback.