Skip to content

Instantly share code, notes, and snippets.

@richardmtl
Created March 27, 2019 15:22
Show Gist options
  • Save richardmtl/1b3e78f7e9bc26942888271b4cd2c49e to your computer and use it in GitHub Desktop.
Save richardmtl/1b3e78f7e9bc26942888271b4cd2c49e to your computer and use it in GitHub Desktop.
limit WPJM Applications allowed file types (untested)
function restrict_wpjm_applications_mime_types( $allowed_mime_types, $field) {
if ( $field['label'] == 'My Field' ) {
unset( $allowed_mime_types['png'] );
$allowed_mime_types['json'] = 'application/json';
}
return $allowed_mime_types;
}
add_filter( 'job_manager_mime_types', 'restrict_wpjm_applications_mime_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment