On this page
apply_filters( 'wp_video_shortcode_override', string $html, array $attr, string $content, int $instance )
Filters the default video shortcode output.
Description
If the filtered output isn’t empty, it will be used instead of generating the default video template.
See also
Parameters
$htmlstring-
Empty variable to be replaced with shortcode markup.
$attrarray-
Attributes of the shortcode. @see wp_video_shortcode()
More Arguments from wp_video_shortcode( ... $attr )
Attributes of the shortcode.
srcstringURL to the source of the video file. Default empty.heightintHeight of the video embed in pixels. Default 360.widthintWidth of the video embed in pixels. Default $content_width or 640.posterstringThe'poster'attribute for the<video>element. Default empty.loopstringThe'loop'attribute for the<video>element. Default empty.autoplaystringThe'autoplay'attribute for the<video>element. Default empty.mutedstringThe'muted'attribute for the<video>element. Default false.preloadstringThe'preload'attribute for the<video>element.
Default'metadata'.classstringThe'class'attribute for the<video>element.
Default'wp-video-shortcode'.
$contentstring-
Video shortcode content.
$instanceint-
Unique numeric ID of this video shortcode instance.
Source
File: wp-includes/media.php. View all references
$override = apply_filters( 'wp_video_shortcode_override', '', $attr, $content, $instance );
Related
Used By
| Used By | Description |
|---|---|
| wp_video_shortcode() wp-includes/media.php | Builds the Video shortcode output. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/wp_video_shortcode_override