Make WordPress Core


Ignore:
Timestamp:
04/07/2017 02:35:39 PM (7 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/translation-install.php

    r39325 r40394  
    203203    }
    204204
    205     if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
     205    if ( wp_disallow_file_mods( 'download_language_pack' ) ) {
    206206        return false;
    207207    }
     
    246246 */
    247247function wp_can_install_language_pack() {
    248     if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
     248    if ( wp_disallow_file_mods( 'can_install_language_pack' ) ) {
    249249        return false;
    250250    }
Note: See TracChangeset for help on using the changeset viewer.