file_mod_allowed filter-hook . WP 4.8.0
Filters whether file modifications are allowed.
Usage
add_filter( 'file_mod_allowed', 'filter_function_name_8083', 10, 2 ); function filter_function_name_8083( $file_mod_allowed, $context ){ // filter... return $file_mod_allowed; }
- $file_mod_allowed(true/false)
- Whether file modifications are allowed.
- $context(string)
- The usage context.
Changelog
Since 4.8.0 | Introduced. |
Where the hook is called
file_mod_allowed
wp-includes/load.php 1537
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );