wp_is_file_mod_allowed()
Determines whether file modifications are allowed.
Hooks from the function
Returns
true|false. True if file modification is allowed, false otherwise.
Usage
wp_is_file_mod_allowed( $context );
- $context(string) (required)
- The usage context.
Changelog
| Since 4.8.0 | Introduced. |
wp_is_file_mod_allowed() wp is file mod allowed code WP 7.0
function wp_is_file_mod_allowed( $context ) {
/**
* Filters whether file modifications are allowed.
*
* @since 4.8.0
*
* @param bool $file_mod_allowed Whether file modifications are allowed.
* @param string $context The usage context.
*/
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
}