Filters whether file modifications are allowed.
Parameters
$file_mod_allowed
bool- Whether file modifications are allowed.
$context
string- The usage context.
Source
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |
When using this filter, the
capability_update_core
context is misleading, as it is being passed not just when checking core files, but also when checking themes and plugins.