Filter hook 'wp_video_extensions'

in WP Core File wp-includes/media.php at line 3571

View Source

wp_video_extensions

Filter Hook
Description
Filters the list of supported video formats.

Hook Information

File Location wp-includes/media.php View on GitHub
Hook Type Filter
Line Number 3571

Hook Parameters

Type Name Description
string[] $extensions An array of supported video formats. Defaults are 'mp4', 'm4v', 'webm', 'ogv', 'flv'.

Usage Examples

Basic Usage
<?php
// Hook into wp_video_extensions
add_filter('wp_video_extensions', 'my_custom_filter', 10, 1);

function my_custom_filter($extensions) {
    // Your custom filtering logic here
    return $extensions;
}

Source Code Context

wp-includes/media.php:3571 - How this hook is used in WordPress core
<?php
3566  	 * @since 3.6.0
3567  	 *
3568  	 * @param string[] $extensions An array of supported video formats. Defaults are
3569  	 *                             'mp4', 'm4v', 'webm', 'ogv', 'flv'.
3570  	 */
3571  	return apply_filters( 'wp_video_extensions', array( 'mp4', 'm4v', 'webm', 'ogv', 'flv' ) );
3572  }
3573  
3574  /**
3575   * Builds the Video shortcode output.
3576   *

PHP Documentation

<?php
/**
	 * 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'.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/media.php
Related Hooks

Related hooks will be displayed here in future updates.