Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: media_embedded_in_content_allowed_types

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3867
3868      /**
3869       * Filters the embedded media types that are allowed to be returned from the content blob.
3870       *
3871       * @since 4.2.0
3872       *
3873       * @param array $allowed_media_types An array of allowed media types. Default media types are
3874       *                                   'audio', 'video', 'object', 'embed', and 'iframe'.
3875       */
3876      $allowed_media_types = apply_filters( 'media_embedded_in_content_allowed_types', array( 'audio', 'video', 'object', 'embed', 'iframe' ) );
3877
3878      if ( ! empty( $types ) ) {
3879           if ( ! is_array( $types ) ) {
3880                $types = array( $types );
3881           }
3882
3883           $allowed_media_types = array_intersect( $allowed_media_types, $types );
3884      }
3885