Ticket #2386 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

the_author('idmode'), idmode is deprecated

Reported by: MichaelH Assigned to: anonymous
Priority: normal Milestone:
Component: Template Version: 2.0
Severity: minor Keywords: bg|has-patch
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

2386.diff (1.1 kB) - added by MichaelH on 02/04/06 04:25:54.
adds idmode ability to the_author in template-functions-author.php
2386a.diff (1.1 kB) - added by westi on 08/30/06 17:41:11.
Patch rebased against trunk
2386b.diff (1.1 kB) - added by westi on 08/30/06 17:53:08.
Use switch not if if if if if if

Change History

02/04/06 04:25:54 changed by MichaelH

  • attachment 2386.diff added.

adds idmode ability to the_author in template-functions-author.php

02/04/06 04:28:44 changed by MichaelH

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.

02/04/06 07:55:37 changed by westi

  • keywords set to bg|has-patch.
  • priority changed from low to normal.
  • component changed from Administration to Template.
  • milestone set to 2.1.

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.

02/04/06 16:24:22 changed by MichaelH

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!

02/04/06 19:49:46 changed by MichaelH

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.

08/30/06 17:41:11 changed by westi

  • attachment 2386a.diff added.

Patch rebased against trunk

08/30/06 17:45:57 changed by ryan

Can we make those ifs if ... else if ... else if ... or a switch to avoid unnecessary comparisons?

08/30/06 17:53:08 changed by westi

  • attachment 2386b.diff added.

Use switch not if if if if if if

08/30/06 18:09:14 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [4140]) Resurrect idmode. Props MichaelH and westi. fixes #2386

08/31/06 02:51:03 changed by matt

  • status changed from closed to reopened.
  • resolution deleted.

This was a deliberate removal. Please revert 4140 and update the documentation.

08/31/06 04:49:18 changed by ryan

Deliberately broken. This is a back compat issue that comes up often.

08/31/06 05:00:45 changed by ryan

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.

08/31/06 05:07:14 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [4146]) Deprecate idmode. fixes #2386

08/31/06 05:07:50 changed by matt

It has been gone for close to a year, compat issues have already passed and I'd rather not reintroduce cruft.

09/04/06 23:03:10 changed by foolswisdom

  • summary changed from the_author('idmode') only returns display_name to the_author('idmode'), idmode is deprecated.

Summary the_author('idmode'), idmode is deprecated was the_author('idmode') only returns display_name

I have updated the Codex.

09/25/06 02:21:06 changed by ryan

(In [4234]) Deprecate idmode. fixes #2386

09/25/06 04:18:51 changed by foolswisdom

  • milestone changed from 2.1 to 2.0.5.

11/30/06 19:41:51 changed by

  • milestone deleted.

Milestone 2.0.5 deleted