On this page
wp_is_file_mod_allowed( string $context ): bool
Determines whether file modifications are allowed.
Parameters
$contextstring Required-
The usage context.
Return
bool True if file modification is allowed, false otherwise.
Source
File: wp-includes/load.php. View all references
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 );
}
Hooks
- apply_filters( 'file_mod_allowed',
bool $file_mod_allowed ,string $context ) -
Filters whether file modifications are allowed.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| wp_can_install_language_pack() wp-admin/includes/translation-install.php | Check if WordPress has access to the filesystem without asking for credentials. |
| wp_download_language_pack() wp-admin/includes/translation-install.php | Download a language pack. |
| WP_Automatic_Updater::is_disabled() wp-admin/includes/class-wp-automatic-updater.php | Determines whether the entire automatic updater is disabled. |
| map_meta_cap() wp-includes/capabilities.php | Maps a capability to the primitive capabilities required of the given user to satisfy the capability being checked. |
Changelog
| Version | Description |
|---|---|
| 4.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_is_file_mod_allowed