Use import cap. Add old edit_files cap to list of caps to shutdown if DISALLOW_FILE_EDIT. see #13681
git-svn-id: http://svn.automattic.com/wordpress/trunk@15097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1f60247343
commit
bf354522bd
|
@ -11,7 +11,7 @@ define('WP_LOAD_IMPORTERS', true);
|
||||||
/** Load WordPress Bootstrap */
|
/** Load WordPress Bootstrap */
|
||||||
require_once ('admin.php');
|
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.'));
|
wp_die(__('You do not have sufficient permissions to import content in this site.'));
|
||||||
|
|
||||||
$title = __('Import');
|
$title = __('Import');
|
||||||
|
|
|
@ -996,6 +996,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||||
else
|
else
|
||||||
$caps[] = 'do_not_allow';
|
$caps[] = 'do_not_allow';
|
||||||
break;
|
break;
|
||||||
|
case 'edit_files':
|
||||||
case 'edit_plugins':
|
case 'edit_plugins':
|
||||||
case 'edit_themes':
|
case 'edit_themes':
|
||||||
if ( defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ) {
|
if ( defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT ) {
|
||||||
|
|
Loading…
Reference in New Issue