Make WordPress Core

Opened 12 years ago

Last modified 6 years ago

#23454 assigned enhancement

_deprecated_function Messages

Reported by: mikejolley's profile mikejolley Owned by: chriscct7's profile chriscct7
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: General Keywords: has-patch
Focuses: Cc:

Description

Unlike _deprecated_file and _deprecated_argument, the _deprecated_function function has no option to append a message to the triggered notice.

I propose adding this to make it consistant with the other 2 functions. Patch to follow.

Attachments (1)

deprecated-function-enhancement.23454.diff (2.3 KB) - added by mikejolley 12 years ago.
Patch for #23454

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
12 years ago

  • Version changed from trunk to 3.5

#2 @mikejolley
11 years ago

@SergeyBiryukov this change is fairly trivial - any chance it will make it into 3.9?

#3 @SergeyBiryukov
11 years ago

  • Keywords 3.9-early added
  • Milestone changed from Awaiting Review to Future Release

#4 @nacin
11 years ago

We haven't had a need for this in core. The reason is because both functions can pretty well describe why one is deprecated for the other. In the case of arguments and files, things are less obvious.

#5 @mikejolley
11 years ago

@nacin I cannot remember the exact case I needed it (10 months ago!) but if you are deprecating a function and there is no replacement, or their is a replacement function that is substantially different, you cannot add any explanation to your message - all you can currently get it to output is:

"X is deprecated since version X with no alternative available."

The change would allow us to add more explanation, and is perfectly backwards compatible with existing uses. Not to mention making it work in line with the other _deprecated functions. Are there any disadvantages to adding it I'm not seeing?

#6 @chriscct7
9 years ago

  • Keywords 3.9-early removed
  • Owner set to chriscct7
  • Status changed from new to assigned
Note: See TracTickets for help on using tickets.