Changeset 40638
- Timestamp:
- 05/11/2017 07:23:45 PM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r40394 r40638 32 32 public function is_disabled() { 33 33 // Background updates are disabled if you don't want file changes. 34 if ( wp_disallow_file_mods( 'automatic_updater' ) )34 if ( ! wp_is_file_mod_allowed( 'automatic_updater' ) ) 35 35 return true; 36 36 -
trunk/src/wp-admin/includes/translation-install.php
r40394 r40638 203 203 } 204 204 205 if ( wp_disallow_file_mods( 'download_language_pack' ) ) {205 if ( ! wp_is_file_mod_allowed( 'download_language_pack' ) ) { 206 206 return false; 207 207 } … … 246 246 */ 247 247 function wp_can_install_language_pack() { 248 if ( wp_disallow_file_mods( 'can_install_language_pack' ) ) {248 if ( ! wp_is_file_mod_allowed( 'can_install_language_pack' ) ) { 249 249 return false; 250 250 } -
trunk/src/wp-includes/capabilities.php
r40404 r40638 363 363 if ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT ) 364 364 $caps[] = 'do_not_allow'; 365 elseif ( wp_disallow_file_mods( 'capability_edit_themes' ) )365 elseif ( ! wp_is_file_mod_allowed( 'capability_edit_themes' ) ) 366 366 $caps[] = 'do_not_allow'; 367 367 elseif ( is_multisite() && ! is_super_admin( $user_id ) ) … … 381 381 // Disallow anything that creates, deletes, or updates core, plugin, or theme files. 382 382 // Files in uploads are excepted. 383 if ( wp_disallow_file_mods( 'capability_update_core' ) ) {383 if ( ! wp_is_file_mod_allowed( 'capability_update_core' ) ) { 384 384 $caps[] = 'do_not_allow'; 385 385 } elseif ( is_multisite() && ! is_super_admin( $user_id ) ) { -
trunk/src/wp-includes/load.php
r40575 r40638 1100 1100 * @return bool True if file modification is disallowed, false otherwise. 1101 1101 */ 1102 function wp_ disallow_file_mods( $context ) {1102 function wp_is_file_mod_allowed( $context ) { 1103 1103 /** 1104 1104 * Filters whether file modifications are disallowed. … … 1106 1106 * @since 4.8.0 1107 1107 * 1108 * @param bool $dis llow_file_mods Whether file modifications are disallowed.1109 * @param string $context The usage context.1108 * @param bool $disallow_file_mods Whether file modifications are disallowed. 1109 * @param string $context The usage context. 1110 1110 */ 1111 return apply_filters( 'disallow_file_mods' 1112 } 1111 return apply_filters( 'disallow_file_mods', defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS, $context ); 1112 }
Note: See TracChangeset
for help on using the changeset viewer.