Customizer: Restrict image control uploaders to only allow image file types. see #22149.

git-svn-id: https://develop.svn.wordpress.org/trunk@22492 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-11-09 05:47:02 +00:00
parent dd39a3b3d2
commit 3da7fa8d1e
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -145,9 +145,17 @@
browser: this.container.find('.upload'),
dropzone: this.container.find('.upload-dropzone'),
success: this.success,
plupload: {},
params: {}
}, this.uploader || {} );
if ( control.params.extensions ) {
control.uploader.plupload.filters = [{
title: api.l10n.allowedFiles,
extensions: control.params.extensions
}];
}
if ( control.params.context )
control.uploader.params['post_data[context]'] = this.params.context;