[wp-trac] [WordPress Trac] #11592: the_author() always returns a value when it only should for back compat
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 24 12:10:39 UTC 2009
#11592: the_author() always returns a value when it only should for back compat
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Template | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
the_author() has a deprecated argument set to false, it returns
get_the_author() instead of echoing get_the_author().
However, if the_author() is run on its own, it not only echoes
get_the_author(), but returns it as well.
This will introduce hypothetical backwards compatibility issues, but if
someone is using the_author() to return a value, they're doing it wrong
for one of two reasons. One, they're using a deprecated argument, and
_deprecated_argument() should now point them to get_the_author(). Or two,
they're not using the deprecated argument, and the_author() is echoing
whatever they also want returned.
Patch corrects this by adding the word "else" where it was presumably
omitted.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11592>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list