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

See #38673.



git-svn-id: https://develop.svn.wordpress.org/trunk@40639 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2017-05-11 19:53:38 +00:00
parent 3f059bff7c
commit 51f545e72a
1 changed files with 6 additions and 6 deletions

View File

@ -1092,21 +1092,21 @@ function is_wp_error( $thing ) {
} }
/** /**
* Determines whether file modifications are disallowed. * Determines whether file modifications are allowed.
* *
* @since 4.8.0 * @since 4.8.0
* *
* @param string $context The usage context. * @param string $context The usage context.
* @return bool True if file modification is disallowed, false otherwise. * @return bool True if file modification is allowed, false otherwise.
*/ */
function wp_is_file_mod_allowed( $context ) { function wp_is_file_mod_allowed( $context ) {
/** /**
* Filters whether file modifications are disallowed. * Filters whether file modifications are allowed.
* *
* @since 4.8.0 * @since 4.8.0
* *
* @param bool $disallow_file_mods Whether file modifications are disallowed. * @param bool $file_mod_allowed Whether file modifications are allowed.
* @param string $context The usage context. * @param string $context The usage context.
*/ */
return apply_filters( 'disallow_file_mods', defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS, $context ); return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
} }