[wp-trac] [WordPress Trac] #36618: Move WP_Upgrader and WP_Upgrader_Skin subclasses into separate files

WordPress Trac noreply at wordpress.org
Sun May 8 11:47:24 UTC 2016


#36618: Move WP_Upgrader and WP_Upgrader_Skin subclasses into separate files
-----------------------------+-----------------------
 Reporter:  ocean90          |       Owner:  ocean90
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  4.6
Component:  Upgrade/Install  |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  early            |     Focuses:
-----------------------------+-----------------------
Changes (by ocean90):

 * keywords:  2nd-opinion early => early


Comment:

 Let's do this in stages. Each stage is one commit.

 1) Create `wp-admin/includes/class-automatic-upgrader-skin.php`, `wp-
 admin/includes/class-bulk-plugin-upgrader-skin.php`, `wp-admin/includes
 /class-bulk-theme-upgrader-skin.php`, `wp-admin/includes/class-bulk-
 upgrader-skin.php`, `wp-admin/includes/class-language-pack-upgrader-
 skin.php`, `wp-admin/includes/class-plugin-installer-skin.php`, `wp-
 admin/includes/class-plugin-upgrader-skin.php`, `wp-admin/includes/class-
 theme-installer-skin.php`, `wp-admin/includes/class-theme-upgrader-
 skin.php`, and `wp-admin/includes/class-wp-upgrader-skin.php` as a copy of
 `wp-admin/includes/class-wp-upgrader-skins.php`.
 2) Update file headers and DocBlocks for each new file.
 3) Change `wp-admin/includes/class-wp-upgrader-skins.php` to
 `require_once` all the new files and update file header.

 4) Create `wp-admin/includes/class-plugin-upgrader.php`, `wp-
 admin/includes/class-theme-upgrader.php`, `wp-admin/includes/class-
 language-pack-upgrader.php`, `wp-admin/includes/class-core-upgrader.php`,
 `wp-admin/includes/class-file-upload-upgrader.php`, and `wp-admin/includes
 /class-wp-automatic-updater.php` as a copy of `wp-admin/includes/class-wp-
 upgrader.php`.
 5) Update file headers and DocBlocks for each new file.
 6) Change `wp-admin/includes/class-wp-upgrader.php` to only include
 `WP_Upgrader` and add `require_once` for all the new files (upgrader and
 skins). Update file header.

 7) If necessary, update file paths for hook docs.
 8) Check references to include/require `wp-admin/includes/class-wp-
 upgrader.php` and if they can be changed to include/require only necessary
 files. `File_Upload_Upgrader` might to be one of those.

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


More information about the wp-trac mailing list