mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +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:
@@ -402,6 +402,7 @@ class WP_Customize_Upload_Control extends WP_Customize_Control {
|
||||
public $type = 'upload';
|
||||
public $removed = '';
|
||||
public $context;
|
||||
public $extensions;
|
||||
|
||||
/**
|
||||
* Enqueue control related scripts/styles.
|
||||
@@ -425,6 +426,9 @@ class WP_Customize_Upload_Control extends WP_Customize_Control {
|
||||
|
||||
if ( $this->context )
|
||||
$this->json['context'] = $this->context;
|
||||
|
||||
if ( $this->extensions )
|
||||
$this->json['extensions'] = $this->extensions;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -456,6 +460,7 @@ class WP_Customize_Image_Control extends WP_Customize_Upload_Control {
|
||||
public $type = 'image';
|
||||
public $get_url;
|
||||
public $statuses;
|
||||
public $extensions = 'jpg,jpeg,gif,png';
|
||||
|
||||
protected $tabs = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user