file_mod_allowed filter-hookWP 4.8.0

Filters whether file modifications are allowed.

Usage

add_filter( 'file_mod_allowed', 'wp_kama_file_mod_allowed_filter', 10, 2 );

/**
 * Function for `file_mod_allowed` filter-hook.
 * 
 * @param bool   $file_mod_allowed Whether file modifications are allowed.
 * @param string $context          The usage context.
 *
 * @return bool
 */
function wp_kama_file_mod_allowed_filter( $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

wp_is_file_mod_allowed()
file_mod_allowed
wp-includes/load.php 1772
return apply_filters( 'file_mod_allowed', ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS, $context );

Where the hook is used in WordPress

Usage not found.