Title: embed_handler_html
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ’embed_handler_html’, string $return, string $url, array $attr )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#changelog)

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

Filters the returned embed HTML.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/embed_handler_html/?output_format=md#see-also)󠁿

 * [WP_Embed::shortcode()](https://developer.wordpress.org/reference/classes/WP_Embed/shortcode/)

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

 `$return`string

The HTML result of the shortcode.

`$url`string

The embed URL.

`$attr`array

An array of shortcode attributes.

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

    ```php
    return apply_filters( 'embed_handler_html', $return, $url, $attr );
    ```

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

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

| Used by | Description | 
| [WP_Embed::get_embed_handler_html()](https://developer.wordpress.org/reference/classes/wp_embed/get_embed_handler_html/)`wp-includes/class-wp-embed.php` |

Returns embed HTML for a given URL from embed handlers.

  |

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

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

## User Contributed Notes

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