WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp get video extensions

Contents

Description

Return a filtered list of WP-supported video formats. (This function is called by wp_video_shortcode() and wp_maybe_load_embeds(), and creates filter wp_video_extensions.)

Default WordPress supported video formats are: mp4, m4v, webm, ogv, wmv, flv.

Usage

 <?php wp_get_video_extensions() ?> 

Parameters

This tag has no parameters.

Return

(array) 
Description.

Example

Print an array of default WordPress-supported video extensions:

$video_extensions = wp_get_video_extensions();

Displays as:

Array
(
    [0] => mp4
    [1] => m4v
    [2] => webm
    [3] => ogv
    [4] => wmv
    [5] => flv
)

Change Log

Source File

wp_get_video_extensions() is located in wp-includes/media.php..

Related

Embeds: wp_oembed_add_provider(), wp_oembed_remove_provider(), wp_oembed_get(), wp_embed_defaults(), wp_embed_register_handler(), wp_embed_unregister_handler(), get_embedded_audio(), get_embedded_media(), get_embedded_video(), wp_embed_handler_audio(), wp_embed_handler_video()

Shortcode API

Video: wp_video_shortcode(), wp_get_video_extensions(), get_attached_video(), get_attached_media(), get_embedded_video(), get_embedded_media(), wp_embed_handler_video(), wp_mediaelement_fallback(), wp_read_video_metadata(), wp_add_id3_tag_data(), the_post_format_video(), get_the_post_format_media(), get_content_video(), get_content_media()

See also index of Function Reference and index of Template Tags.