wp_video_shortcode


wp_video_shortcode ( $attr, $content = '' )

Parameters:
  • (array) attr { Attributes of the shortcode. @type string $src URL to the source of the video file. Default empty. @type int $height Height of the video embed in pixels. Default 360. @type int $width Width of the video embed in pixels. Default $content_width or 640. @type string $poster The 'poster' attribute for the `<video>` element. Default empty. @type string $loop The 'loop' attribute for the `<video>` element. Default empty. @type string $autoplay The 'autoplay' attribute for the `<video>` element. Default empty. @type string $muted The 'muted' attribute for the `<video>` element. Default false. @type string $preload The 'preload' attribute for the `<video>` element. Default 'metadata'. @type string $class The 'class' attribute for the `<video>` element. Default 'wp-video-shortcode'. }
  • (string) content Shortcode content.
Returns:
  • (string|void) HTML content to display video.
Defined at:

Description

Builds the Video shortcode output.This implements the functionality of the Video Shortcode for displaying WordPress mp4s in a post.

Related Functions

wp_audio_shortcode, do_shortcode, wp_playlist_shortcode, add_shortcode, do_shortcode_tag

Top Google Results

User discussions

wpseek mobile