Opened 8 years ago

Closed 8 years ago

#2331 closed defect (bug) (fixed)

Code Reference: Incorrect notice for deprecated functions with no @see

Reported by: dimadin's profile dimadin Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords: has-patch


Deprecated functions that don't have @see always display version when they were deprecated instead of description that follows after that version.

For example, function get_editable_user_ids() has no @see but has description in @deprecated (Use get_users()). Instead, in notice, you can see "3.1.0 instead.":

Also, same type of notice is displayed for functions that have no alternative functions at all, like _relocate_children():

Problem is that from [2816] $deprecated['content'] is used where $deprecated['description'] should have been used. $deprecated['content'] always holds version when function is deprecated while $deprecated['description'] exists if there is something after version number.

See #1647.


Attachments (1)

2331.diff (810 bytes) - added by dimadin 8 years ago.

Download all attachments as: .zip

Change History (2)

8 years ago

#1 @coffee2code
8 years ago

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

In 4556: Fix deprecation notice banner to use description from @deprecated when no @see is provided.

Props dimadin.
Fixes #2331.

Note: See TracTickets for help on using tickets.