WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/11/2017 07:23:45 PM (4 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/capabilities.php

    r40404 r40638  
    363363        if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
    364364            $caps[] = 'do_not_allow';
    365         elseif ( wp_disallow_file_mods( 'capability_edit_themes' ) )
     365        elseif ( ! wp_is_file_mod_allowed( 'capability_edit_themes' ) )
    366366            $caps[] = 'do_not_allow';
    367367        elseif ( is_multisite() && ! is_super_admin( $user_id ) )
     
    381381        // Disallow anything that creates, deletes, or updates core, plugin, or theme files.
    382382        // Files in uploads are excepted.
    383         if ( wp_disallow_file_mods( 'capability_update_core' ) ) {
     383        if ( ! wp_is_file_mod_allowed( 'capability_update_core' ) ) {
    384384            $caps[] = 'do_not_allow';
    385385        } elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
Note: See TracChangeset for help on using the changeset viewer.