Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#21874 closed enhancement (fixed)

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

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

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 14 years ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
14 years ago

  • Component General → Upgrade/Install
  • Version trunk → 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
13 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
13 years ago

  • Milestone Awaiting Review → 3.7

#4 @dd32
13 years ago

  • Owner set to dd32
  • Resolution → fixed
  • Status new → 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.