Last active
December 14, 2018 16:35
-
-
Save edurodriguesdias/92a0adc1852dcf9c8d34348c243f2239 to your computer and use it in GitHub Desktop.
Show only files with .zip or .pdf extension WP MEDIA - Wordpress
This file contains hidden or 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
var image = wp.media({ | |
title: 'Import file', | |
multiple: false, //if true, allow select multiple files | |
library: { | |
type: [ 'application/zip', 'application/pdf' ] | |
} | |
}).open() | |
.on('select', function(e){ | |
//DO SOMETHING | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment