Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#21874 closed enhancement (fixed)

Remove unused functions in wp-admin/includes/update.php

Reported by: solarissmoke's profile solarissmoke Owned by: dd32's profile dd32
Milestone: 3.7 Priority: normal
Severity: minor Version: 2.8
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:

Description

Just noticed these two functions, wp_update_plugin() and wp_update_theme(), which aren't used anywhere in core, and haven't been for a very long time far as I can tell. Looks like redundant code.

Attachments (1)

21874.diff (1.0 KB) - added by solarissmoke 11 years ago.

Download all attachments as: .zip

Change History (5)

@solarissmoke
11 years ago

#1 @SergeyBiryukov
11 years ago

  • Component changed from General to Upgrade/Install
  • Version changed from trunk to 2.8

Unused since [11005].

wp_update_plugin() is used in at least one plugin (outdated though):
http://plugins.trac.wordpress.org/browser/ajax-plugin-helper/tags/1.0.5/ajax-plugin-helper.php#L294
And was mentioned on the forums at least once:
http://wordpress.org/support/topic/programmatically-update-wordpress

Perhaps it's safer to deprecate them.

#2 @dd32
10 years ago

Perhaps it's safer to Deprecate them, but I think we might be able to get away with just removing them.

From what I can see, all the major things use the classes directly, and we should push people to using WP CLI or similar for custom scripts (since they handle the edgecases better)

#3 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.7

#4 @dd32
10 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 25307:

Upgrader: Deprecate a few mostly unused functions, wp_update_plugin(), wp_update_theme(), and, wp_update_core().
wp_update_core() was still used, as it was never updated to make use of the newer Skins. Fixes #21874

Note: See TracTickets for help on using tickets.