Created
March 27, 2019 15:22
-
-
Save richardmtl/1b3e78f7e9bc26942888271b4cd2c49e to your computer and use it in GitHub Desktop.
limit WPJM Applications allowed file types (untested)
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
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