mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user