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 video shortcode

Contents

Description

Implements the functionality of the Video Shortcode for displaying (and playing) video-files in a post. Conditionally adds HTML video tag (with media player, sized to $content_width defined in active Theme) or fallback HTML.

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

Usage

 <?php wp_video_shortcode$attr ?> 

Parameters

$attr
(array) (required) Attributes of the shortcode.
Default: None

Return

(string) 
HTML content to display video.

Example

Change Log

Source File

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

Related

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.