[wp-trac] [WordPress Trac] #52381: Add filter for results of `copy_dir()` in WP_Upgrader

WordPress Trac noreply at wordpress.org
Tue Jan 26 20:49:10 UTC 2021


#52381: Add filter for results of `copy_dir()` in WP_Upgrader
-----------------------------+-----------------------------
 Reporter:  afragen          |      Owner:  (none)
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:
 Severity:  normal           |   Keywords:  has-patch early
  Focuses:                   |
-----------------------------+-----------------------------
 Adding a filter to the result of `copy_dir()` in
 `WP_Upgrader::install_package()` allows for the capture and usage of error
 data resulting from the `copy_dir()` function.

 The proposed filter additionally allows for a potential plugin/theme
 rollback in the event of an update failure due to `copy_dir()`. A rollback
 feature for plugin/theme update failures was originally proposed in
 #51857.

 A feature plugin [https://github.com/afragen/rollback-update-failure
 Rollback Update Failure] is available for testing utilizing this filter.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52381>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list