#2386 closed defect (bug) (fixed)
the_author('idmode'), idmode is deprecated
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | minor | Version: | 2.0 |
| Component: | Template | Keywords: | bg|has-patch |
| Focuses: | Cc: |
Description
Using the_author('idmode') returns just the display_name, no matter the value entered in the 'idmode' parameter.
According to http://codex.wordpress.org/Template_Tags/the_author the 'idmode' parameter allows you to control what gets returned by this function. It looks like it was there in 1.5.2 so here's a patch to put it back.
If this doesn't belong in the function, I'll fix Codex. Thanks.
Attachments (3)
Change History (18)
#1
@
20 years ago
Additional note--I used nickname but somewhere I remember discussion that user_nickname will eventually work.
Function will return display_name if no parameter is passed.
#2
@
20 years ago
- Component changed from Administration to Template
- Keywords bg|has-patch added
- Milestone set to 2.1
- Priority changed from low to normal
For reference this was removed by matt in changeset [2633] while doing all the new user stuff for 2.0.
It was also removed from get_author_name in functions-post.php in the same changeset so will need fixing there as well.
#3
@
20 years ago
Not to sure if get_author_name needs changing.
It seems somewhere along the line, the_author was changed from having no parameters to having the idmode and echo parameters.
I've made a note in Codex that currently, only the display_name value gets displayed/returned by this function. Based on the inclusion of this Ticket in subsequent releases, I'll revise Codex accordingly.
Thanks westi!
#4
@
20 years ago
Also tested the 2386.diff fix with the_author_posts_link() and the various idmode settings decribed in http://codex.wordpress.org/Template_Tags/the_author_posts_link and it works.
Again I've explained on the Codex page that the idmode isn't working now. And, I'll also revise that Codex page on disposition of this ticket.
#5
@
19 years ago
Can we make those ifs if ... else if ... else if ... or a switch to avoid unnecessary comparisons?
#7
@
19 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This was a deliberate removal. Please revert 4140 and update the documentation.
#9
@
19 years ago
idmode is used extensively in the author API. I wish it had never existed, but it does and leaving it broken seems lame. Regardless, I'll roll it back and comment the API.
#11
@
19 years ago
It has been gone for close to a year, compat issues have already passed and I'd rather not reintroduce cruft.
adds idmode ability to the_author in template-functions-author.php