[wp-trac] [WordPress Trac] #17173: Review the usage of _copy_dir() introduced in #14484

WordPress Trac noreply at wordpress.org
Tue Sep 13 16:56:16 UTC 2022


#17173: Review the usage of _copy_dir() introduced in #14484
---------------------------------+---------------------
 Reporter:  dd32                 |       Owner:  dd32
     Type:  defect (bug)         |      Status:  closed
 Priority:  normal               |   Milestone:  3.2
Component:  Upgrade/Install      |     Version:
 Severity:  normal               |  Resolution:  fixed
 Keywords:  3.3-early has-patch  |     Focuses:
---------------------------------+---------------------

Comment (by SergeyBiryukov):

 In [changeset:"54143" 54143]:
 {{{
 #!CommitTicketReference repository="" revision="54143"
 Upgrade/Install: Remove `_copy_dir()` function as originally intended.

 WordPress 3.2 introduced several enhancements to the `copy_dir()`
 function:
 * No more re-installing Akismet upon upgrade.
 * Respect custom `WP_CONTENT_DIR` for bundled plugins/theme installation.
 * Respect custom `WP_CONTENT_DIR`/`WP_LANG_DIR` for language files when
 upgrading.
 * Add an exclusion list to `copy_dir()` as well as
 `WP_Filesystem_Base::wp_lang_dir()`.
 * Standardize `WP_Filesystem` path method returns.

 However, the version of `copy_dir()` that runs during the upgrade process
 is the one from the older install, not the newer, which means that these
 enhancements would only be available after upgrading to WordPress 3.2
 first, e.g. in a subsequent upgrade to WordPress 3.3.

 In order to make these enhancements immediately available in WordPress
 3.2, specifically to take advantage of skip lists and avoid re-installing
 Akismet if it was previously deleted, a temporary copy of the function was
 utilized, with the intention to remove it in WordPress 3.3 or a later
 release.

 With further enhancements made to the Upgrade API to support partial and
 no-content builds, this temporary copy is no longer relevant and can be
 safely removed.

 Follow-up to [17576], [17580], [17581], [18225].

 Props afragen, costdev, dd32, peterwilsoncc, SergeyBiryukov.
 Fixes #55712. See #17173.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/17173#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list