Make WordPress Core

Opened 8 years ago

Closed 2 years ago

Last modified 2 years ago

#39710 closed enhancement (fixed)

Deprecate unused `WP_Media_List_Table::column_desc()`

Reported by: iandunn's profile iandunn Owned by: audrasjb's profile audrasjb
Milestone: 6.2 Priority: normal
Severity: trivial Version: 4.3
Component: Media Keywords: needs-dev-note has-patch commit
Focuses: Cc:

Description

As far as I can tell, WP_Media_List_Table::column_desc() never gets called by anything in Core. It doesn't look like there's ever been a Description column in that table.

I think it was just accidentally added when the table was broken out into it's own file (list-table-media.php at the time) from default-list-tables.php in r15491. It might go back even further, but that's when I stopped digging :)

Attachments (2)

39710.diff (536 bytes) - added by iandunn 8 years ago.
39710.2.diff (552 bytes) - added by costdev 2 years ago.
Version number updated and .0 added for consistency with other calls in Core.

Download all attachments as: .zip

Change History (21)

@iandunn
8 years ago

#1 @JeffMatson
8 years ago

  • Severity changed from normal to trivial

It looks like nothing uses it, but it might be used by anyone who might be extending the class. I don't see any harm in keeping it in there for those purposes, but otherwise, it could be removed.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


2 years ago

#3 @antpb
2 years ago

  • Milestone changed from Awaiting Review to 6.2

This ticket has had no movement in some years and it seems that only a handful of plugins are using WP_Media_List_Table: https://wpdirectory.net/search/01GE2BXQRQC39EN3RJ0MP3X7B2 and of those we were not able to find any using column_desc in a spot check.

It was decided in the recent media component meeting during a bug scrub of older tickets that we should tackle this in 6.2 to stop any future use of this function.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by costdev. View the logs.


2 years ago

@costdev
2 years ago

Version number updated and .0 added for consistency with other calls in Core.

#6 @audrasjb
2 years ago

  • Keywords has-patch commit added
  • Owner set to audrasjb
  • Status changed from new to accepted

Indeed, let's deprecate this unused method.
Self assigning for commit.

#7 @audrasjb
2 years ago

  • Keywords needs-dev-note added

Adding needs-dev-note so we can mention this deprecation in a quick note in the Misc chanfges (or Media changes) dev note.

#8 @audrasjb
2 years ago

  • Keywords commit removed

Ah, we need a deprecated @since mention, too.

#10 @audrasjb
2 years ago

  • Keywords commit added

Self assigning for commit.

#11 @audrasjb
2 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 55159:

Media: Deprecate unused method WP_Media_List_Table::column_desc().

This changeset formally deprecates the column_desc() method from WP_Media_List_Table, as it was never used anywhere in core.

Props iandunn, JeffMatson, antpb, costdev, audrasjb.
Fixes #39710.

#13 @peterwilsoncc
2 years ago

  • Keywords has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

More frequently than not, WordPress maintains the functionality of a deprecated function for backward compatibility, see https://core.trac.wordpress.org/changeset/49146#file1 as an example.

There are some exceptions when it's not possible but I don't think this is such a case.

I've reopened the ticket for consideration.

This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.


2 years ago

#15 @mukesh27
2 years ago

  • Keywords needs-patch added
  • Version set to 4.3

This ticket was discussed in the recent bug scrub.

This needs a follow-up patch to address Peter's feedback.

Props to @costdev

This ticket was mentioned in PR #4018 on WordPress/wordpress-develop by @costdev.


2 years ago
#16

  • Keywords has-patch added; needs-patch removed

#17 @costdev
2 years ago

  • Keywords commit added

I have submitted PR 4018 to address @peterwilsoncc's feedback.

Adding for commit consideration.

#18 @audrasjb
2 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 55249:

Media: Maintain the functionnality of the deprecated WP_Media_List_Table::column_desc() method.

Follow-up to [55159].

Props peterwilsoncc, costdev, mukesh27.
Fixes #39710.

Note: See TracTickets for help on using tickets.