Changeset 53578
- Timestamp:
- 06/26/2022 12:35:28 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r53132 r53578 594 594 595 595 // Copy new version of item into place. 596 $result = copy_dir( $source, $remote_destination ); 596 if ( class_exists( 'Rollback_Update_Failure\WP_Upgrader' ) 597 && function_exists( '\Rollback_Update_Failure\move_dir' ) 598 ) { 599 /* 600 * If the {@link https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure} 601 * feature plugin is installed, use the move_dir() function from there for better performance. 602 * Instead of copying a directory from one location to another, it uses the rename() PHP function 603 * to speed up the process. If the renaming failed, it falls back to copy_dir(). 604 * 605 * This condition aims to facilitate broader testing of the Rollbacks (temp backups) feature project. 606 * It is temporary, until the plugin is merged into core. 607 */ 608 $result = \Rollback_Update_Failure\move_dir( $source, $remote_destination ); 609 } else { 610 $result = copy_dir( $source, $remote_destination ); 611 } 612 597 613 if ( is_wp_error( $result ) ) { 598 614 if ( $args['clear_working'] ) {
Note: See TracChangeset
for help on using the changeset viewer.