Skip to content

Instantly share code, notes, and snippets.

@iworks
Created December 27, 2016 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iworks/5536e5933461af1259b7c49cf488eb64 to your computer and use it in GitHub Desktop.
Save iworks/5536e5933461af1259b7c49cf488eb64 to your computer and use it in GitHub Desktop.
Add CoursePress allowed file types.
<?php
/**
* Add CoursePress allowed file types.
*/
add_filter( 'coursepress_allowed_student_mimes', 'custom_coursepress_allowed_student_mimes' );
function custom_coursepress_allowed_student_mimes( $mimes_array ) {
/**
* Add gzip.
*/
if ( ! isset( $mimes_array['gzip'] ) ) {
$mimes_array['gzip'] = 'application/gzip';
}
return $mimes_array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment