[wp-trac] [WordPress Trac] #11386: Remove $deprecated = '' arguments that don't affect argument order
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 14 06:02:28 UTC 2009
#11386: Remove $deprecated = '' arguments that don't affect argument order
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Inline Docs | Version:
Severity: normal | Keywords: has-patch close
--------------------------+-------------------------------------------------
Comment(by nacin):
Replying to [comment:1 strider72]:
> A potential problem with this is if a new argument is later added to the
function. Then you could have old plugins passing data to the missing
parameter, but the new version of the function accepting it as the new
parameter. Might mess things up.
I hadn't considered that, and I wanted to close as wontfix once I saw it.
At the very least, I am all for a _deprecated_argument() function. This is
important, as while a plugin developer may notice changes to functions
over the course of a new version, they might not realize an argument they
were using no longer works. For the most part, they'd have to follow
development quite closely to have caught the change.
That said, deprecated files still include the proper file and nearly all
deprecated functions have replacements and still perform the proper
function. On the other hand, deprecated arguments are entirely useless and
no longer serve any purpose in the code. Indeed, there is no longer any
documentation for what they were or when they were removed.
So, if we were to re-tailor this to a _deprecated_argument() function,
would that have traction?
Also, before I forget and this ticket gets closed, there is actually a
functional change to the_author() in this patch, which may have been
inadvertent but nonetheless would restore it to proper functionality. If
you want the_author() to echo a value, it'll do so, but also return it. It
should only do one or the other. Probably could go into another ticket.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11386#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list