plugin updates
This commit is contained in:
@@ -154,6 +154,10 @@ if ( isset( $_GET['action'] ) ) {
|
||||
|
||||
check_admin_referer( 'plugin-upload' );
|
||||
|
||||
if ( isset( $_FILES['pluginzip']['name'] ) && ! str_ends_with( strtolower( $_FILES['pluginzip']['name'] ), '.zip' ) ) {
|
||||
wp_die( __( 'Only .zip archives may be uploaded.' ) );
|
||||
}
|
||||
|
||||
$file_upload = new File_Upload_Upgrader( 'pluginzip', 'package' );
|
||||
|
||||
// Used in the HTML title tag.
|
||||
@@ -302,6 +306,10 @@ if ( isset( $_GET['action'] ) ) {
|
||||
|
||||
check_admin_referer( 'theme-upload' );
|
||||
|
||||
if ( isset( $_FILES['themezip']['name'] ) && ! str_ends_with( strtolower( $_FILES['themezip']['name'] ), '.zip' ) ) {
|
||||
wp_die( __( 'Only .zip archives may be uploaded.' ) );
|
||||
}
|
||||
|
||||
$file_upload = new File_Upload_Upgrader( 'themezip', 'package' );
|
||||
|
||||
// Used in the HTML title tag.
|
||||
|
||||
Reference in New Issue
Block a user