diff --git c/src/wp-admin/includes/class-wp-automatic-updater.php w/src/wp-admin/includes/class-wp-automatic-updater.php
index ea2d70c..3922a0b 100644
--- c/src/wp-admin/includes/class-wp-automatic-updater.php
+++ w/src/wp-admin/includes/class-wp-automatic-updater.php
@@ -31,7 +31,7 @@ class WP_Automatic_Updater {
 	 */
 	public function is_disabled() {
 		// Background updates are disabled if you don't want file changes.
-		if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
+		if ( wp_disallow_file_mods( 'automatic_updater' ) )
 			return true;
 
 		if ( wp_installing() )
diff --git c/src/wp-admin/includes/dashboard.php w/src/wp-admin/includes/dashboard.php
index aab5976..906b410 100644
--- c/src/wp-admin/includes/dashboard.php
+++ w/src/wp-admin/includes/dashboard.php
@@ -1149,7 +1149,7 @@ function wp_dashboard_primary() {
 		)
 	);
 
-	if ( ( ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) {
+	if ( ( ! wp_disallow_file_mods( 'dashboard_widget' ) ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) {
 		$feeds['plugins'] = array(
 			'link'         => '',
 			'url'          => array(
diff --git c/src/wp-admin/includes/translation-install.php w/src/wp-admin/includes/translation-install.php
index ee8254d..c9e942e 100644
--- c/src/wp-admin/includes/translation-install.php
+++ w/src/wp-admin/includes/translation-install.php
@@ -181,7 +181,7 @@ function wp_download_language_pack( $download ) {
 		return $download;
 	}
 
-	if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
+	if ( wp_disallow_file_mods( 'download_language_pack' ) ) {
 		return false;
 	}
 
@@ -224,7 +224,7 @@ function wp_download_language_pack( $download ) {
  * @return bool Returns true on success, false on failure.
  */
 function wp_can_install_language_pack() {
-	if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
+	if ( wp_disallow_file_mods( 'can_install_language_pack' ) ) {
 		return false;
 	}
 
diff --git c/src/wp-includes/capabilities.php w/src/wp-includes/capabilities.php
index fe87bc8..92e6311 100644
--- c/src/wp-includes/capabilities.php
+++ w/src/wp-includes/capabilities.php
@@ -336,7 +336,7 @@ function map_meta_cap( $cap, $user_id ) {
 		// Disallow the file editors.
 		if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
 			$caps[] = 'do_not_allow';
-		elseif ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
+		elseif ( wp_disallow_file_mods( 'capability_edit_themes' ) )
 			$caps[] = 'do_not_allow';
 		elseif ( is_multisite() && ! is_super_admin( $user_id ) )
 			$caps[] = 'do_not_allow';
@@ -354,7 +354,7 @@ function map_meta_cap( $cap, $user_id ) {
 	case 'update_core':
 		// Disallow anything that creates, deletes, or updates core, plugin, or theme files.
 		// Files in uploads are excepted.
-		if ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS ) {
+		if ( wp_disallow_file_mods( 'capability_update_core' ) ) {
 			$caps[] = 'do_not_allow';
 		} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
 			$caps[] = 'do_not_allow';
diff --git c/src/wp-includes/load.php w/src/wp-includes/load.php
index 42e2b71..5eff9c9 100644
--- c/src/wp-includes/load.php
+++ w/src/wp-includes/load.php
@@ -1064,3 +1064,15 @@ function wp_doing_ajax() {
 function is_wp_error( $thing ) {
 	return ( $thing instanceof WP_Error );
 }
+
+/**
+ * Determines whether file modifications are disallowed.
+ *
+ * @since 4.7.0
+ *
+ * @param string $context Where it has been called from.
+ * @return bool True if file modification is disallowed, False otherwise.
+ */
+function wp_disallow_file_mods( $context ) {
+	/**
+	 * Filter the DISALLOW_FILE_MODS constant.
+	 *
+	 * @since 4.7.0
+	 *
+	 * @param bool $disllow_file_mods The DISALLOW_FILE_MODS value.
+	 * @param string $context Where it has been called from.
+	 */
+	return apply_filters( 'disallow_file_mods' , defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS, $context );
+}
\ No newline at end of file
