Use import cap. Add old edit_files cap to list of caps to shutdown if DISALLOW_FILE_EDIT. see #13681
git-svn-id: https://develop.svn.wordpress.org/trunk@15097 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
171d6811cc
commit
ba0dab7090
@ -11,7 +11,7 @@ define('WP_LOAD_IMPORTERS', true);
|
||||
/** Load WordPress Bootstrap */
|
||||
require_once ('admin.php');
|
||||
|
||||
if ( !current_user_can('edit_files') )
|
||||
if ( !current_user_can('import') )
|
||||
wp_die(__('You do not have sufficient permissions to import content in this site.'));
|
||||
|
||||
$title = __('Import');
|
||||
|
@ -996,6 +996,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
else
|
||||
$caps[] = 'do_not_allow';
|
||||
break;
|
||||
case 'edit_files':
|
||||
case 'edit_plugins':
|
||||
case 'edit_themes':
|
||||
if ( defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ) {
|
||||
|
Loading…
Reference in New Issue
Block a user