wp_get_video_extensions() WordPress Function

The wp_get_video_extensions() function returns an array of common video file extensions. This can be useful for validating video files before uploading them to a WordPress site.

wp_get_video_extensions() #

Returns a filtered list of supported video formats.


Return

(string[]) List of supported video formats.


Top ↑

Source

File: wp-includes/media.php

function wp_get_video_extensions() {
	/**
	 * Filters the list of supported video formats.
	 *
	 * @since 3.6.0
	 *
	 * @param string[] $extensions An array of supported video formats. Defaults are
	 *                             'mp4', 'm4v', 'webm', 'ogv', 'flv'.
	 */
	return apply_filters( 'wp_video_extensions', array( 'mp4', 'm4v', 'webm', 'ogv', 'flv' ) );
}


Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More