Skip to content

Commit

Permalink
Disable code that disables uploading plugins and themes.
Browse files Browse the repository at this point in the history
  • Loading branch information
corsacca committed Jun 3, 2019
1 parent eca8b7c commit c0d0401
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dt-core/admin/config-site-defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
//}

0 comments on commit c0d0401

Please sign in to comment.