Make WordPress Core

Changeset 40639


Ignore:
Timestamp:
05/11/2017 07:53:38 PM (7 years ago)
Author:
swissspidy
Message:

Upgrade/Install: After [40638], make sure wp_is_file_mod_allowed() actually returns the right value.

See #38673.

File:
1 edited

Legend:

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

    r40638 r40639  
    10931093
    10941094/**
    1095  * Determines whether file modifications are disallowed.
     1095 * Determines whether file modifications are allowed.
    10961096 *
    10971097 * @since 4.8.0
    10981098 *
    10991099 * @param string $context The usage context.
    1100  * @return bool True if file modification is disallowed, false otherwise.
     1100 * @return bool True if file modification is allowed, false otherwise.
    11011101 */
    11021102function wp_is_file_mod_allowed( $context ) {
    11031103    /**
    1104      * Filters whether file modifications are disallowed.
     1104     * Filters whether file modifications are allowed.
    11051105     *
    11061106     * @since 4.8.0
    11071107     *
    1108      * @param bool   $disallow_file_mods Whether file modifications are disallowed.
    1109      * @param string $context            The usage context.
     1108     * @param bool   $file_mod_allowed Whether file modifications are allowed.
     1109     * @param string $context          The usage context.
    11101110     */
    1111     return apply_filters( 'disallow_file_mods', defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS, $context );
    1112 }
     1111    return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
     1112}
Note: See TracChangeset for help on using the changeset viewer.