media_embedded_in_content_allowed_types
Filters the embedded media types that are allowed to be returned from the content blob.
Usage
add_filter( 'media_embedded_in_content_allowed_types', 'wp_kama_media_embedded_in_content_allowed_types_filter' ); /** * Function for `media_embedded_in_content_allowed_types` filter-hook. * * @param string[] $allowed_media_types An array of allowed media types. * * @return string[] */ function wp_kama_media_embedded_in_content_allowed_types_filter( $allowed_media_types ){ // filter... return $allowed_media_types; }
- $allowed_media_types(string[])
- An array of allowed media types.
Default: media types are 'audio', 'video', 'object', 'embed', and 'iframe'
Changelog
Since 4.2.0 | Introduced. |
Where the hook is called
media_embedded_in_content_allowed_types
wp-includes/media.php 5037
$allowed_media_types = apply_filters( 'media_embedded_in_content_allowed_types', array( 'audio', 'video', 'object', 'embed', 'iframe' ) );