mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Upgrade/Install: After [40394], rename wp_disallow_file_mods() to wp_is_file_mod_allowed().
This makes it more clear what this function is about. Props Mte90. Fixes #38673. git-svn-id: https://develop.svn.wordpress.org/trunk@40638 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -362,7 +362,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
// Disallow the file editors.
|
||||
if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
|
||||
$caps[] = 'do_not_allow';
|
||||
elseif ( wp_disallow_file_mods( 'capability_edit_themes' ) )
|
||||
elseif ( ! wp_is_file_mod_allowed( 'capability_edit_themes' ) )
|
||||
$caps[] = 'do_not_allow';
|
||||
elseif ( is_multisite() && ! is_super_admin( $user_id ) )
|
||||
$caps[] = 'do_not_allow';
|
||||
@@ -380,7 +380,7 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
case 'update_core':
|
||||
// Disallow anything that creates, deletes, or updates core, plugin, or theme files.
|
||||
// Files in uploads are excepted.
|
||||
if ( wp_disallow_file_mods( 'capability_update_core' ) ) {
|
||||
if ( ! wp_is_file_mod_allowed( 'capability_update_core' ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
|
||||
$caps[] = 'do_not_allow';
|
||||
|
||||
Reference in New Issue
Block a user