Make WordPress Core


Ignore:
Timestamp:
04/07/2017 02:35:39 PM (8 years ago)
Author:
swissspidy
Message:

Upgrade/Install: Introduce wp_disallow_file_mods() helper function.

This is a wrapper around the checks for the DISALLOW_FILE_MODS constant to determine whether file modifications are disallowed.

Props MaximeCulea.
Fixes #38673.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-automatic-updater.php

    r38459 r40394  
    3232    public function is_disabled() {
    3333        // Background updates are disabled if you don't want file changes.
    34         if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
     34        if ( wp_disallow_file_mods( 'automatic_updater' ) )
    3535            return true;
    3636
Note: See TracChangeset for help on using the changeset viewer.