From c0d0401e0ee2180ae9be9acb870bfc56eddae7c3 Mon Sep 17 00:00:00 2001 From: corsacca Date: Mon, 3 Jun 2019 14:27:36 +0100 Subject: [PATCH] Disable code that disables uploading plugins and themes. --- dt-core/admin/config-site-defaults.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dt-core/admin/config-site-defaults.php b/dt-core/admin/config-site-defaults.php index 9a950634a4..1eed3eb5fa 100644 --- a/dt-core/admin/config-site-defaults.php +++ b/dt-core/admin/config-site-defaults.php @@ -34,7 +34,7 @@ add_action( 'admin_init', 'dt_security_headers_insert' ); // wp-login.php doesn't have a send_headers action so we abuse init add_action( 'login_init', 'dt_security_headers_insert' ); -add_filter( 'wp_handle_upload_prefilter', 'dt_disable_file_upload' ); +//add_filter( 'wp_handle_upload_prefilter', 'dt_disable_file_upload' ); //this breaks uploading plugins and themes /********************************************************************************************* * Functions @@ -755,7 +755,7 @@ function dt_security_headers_insert() { // header( "Content-Security-Policy: default-src 'self' https:; img-src 'self' https: data:; script-src https: 'self' 'unsafe-inline' 'unsafe-eval'; style-src https: 'self' 'unsafe-inline'" ); } -function dt_disable_file_upload( $file ) { - $file['error'] = 'Uploading has been disabled'; - return $file; -} +//function dt_disable_file_upload( $file ) { +// $file['error'] = 'Uploading has been disabled'; +// return $file; +//}