WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 17 months ago

#36618 closed enhancement

Move WP_Upgrader and WP_Upgrader_Skin subclasses into separate files — at Initial Version

Reported by: ocean90 Owned by:
Milestone: 4.6 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: early
Focuses: Cc:

Description

Related: #34432, #36335

trunk/src/wp-admin/includes/class-wp-upgrader-skins.php includes WP_Upgrader_Skin, Plugin_Upgrader_Skin, Bulk_Upgrader_Skin, Plugin_Installer_Skin, Theme_Installer_Skin, Theme_Upgrader_Skin, Language_Pack_Upgrader_Skin, and Automatic_Upgrader_Skin.

trunk/src/wp-admin/includes/class-wp-upgrader.php includes WP_Upgrader, Plugin_Upgrader, Theme_Upgrader, Language_Pack_Upgrader, and Core_Upgrader.
The same file includes also File_Upload_Upgrader and WP_Automatic_Updater which are not a subclass of WP_Upgrader and the file includes class-wp-upgrader-skins.php.

Sadly, the naming of the classes isn't quite good because they don't have a unique prefix.

Based on the current naming schema we'd have the following new and old files:

wp-admin/includes/class-wp-upgrader.php // Includes WP_Upgrader and requires files below except fo class-wp-upgrader-skins.php.
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
wp-admin/includes/class-wp-automatic-updater.php
wp-admin/includes/class-wp-upgrader-skins.php // Only for back-compat, requires files below.
wp-admin/includes/class-wp-upgrader-skin.php
wp-admin/includes/class-plugin-upgrader-skin.php
wp-admin/includes/class-bulk-upgrader-skin.php
wp-admin/includes/class-plugin-installer-skin.php
wp-admin/includes/class-theme-installer-skin.php
wp-admin/includes/class-theme-upgrader-skin.php
wp-admin/includes/class-language-pack-upgrader-skin.php
wp-admin/includes/class-automatic-upgrader-skin.php

Thoughts?

Change History (0)

Note: See TracTickets for help on using tickets.