Created
June 22, 2016 07:06
-
-
Save caercam/89f186c706beb242b40cfef93c54a949 to your computer and use it in GitHub Desktop.
Add 'MKV' and 'MP4' to supported WPMovieLibrary media types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add new movie medias | |
* | |
* @param array Exisiting media | |
* | |
* @return array Updated media | |
*/ | |
function wpmoly_add_new_media_type( $media ) { | |
$new_media = array( | |
'mkv' => 'MKV', | |
'mp4' => 'MP4' | |
); | |
$media = array_merge( $media, $new_media ); | |
return $media; | |
} | |
add_filter( 'wpmoly_filter_detail_media', 'wpmoly_add_new_media_type', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment