Make WordPress Core

Opened 8 years ago

Closed 7 years ago

#38258 closed defect (bug) (fixed)

Improve inline docs for the_author_meta

Reported by: grapplerulrich's profile grapplerulrich Owned by: drewapicture's profile DrewAPicture
Milestone: 4.9 Priority: normal
Severity: normal Version: 2.8
Component: Users Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

In the inline documentation for the_author_meta() there is no reference to the fields that are included in WordPress core. This also affects get_the_author_meta too. There is a complete list in the codex https://codex.wordpress.org/Function_Reference/the_author_meta

Attachments (2)

38258.patch (1.7 KB) - added by choongsavvii 8 years ago.
38258.2.patch (1.7 KB) - added by choongsavvii 8 years ago.

Download all attachments as: .zip

Change History (10)

#1 @Kenshino
8 years ago

  • Type changed from enhancement to defect (bug)

#2 @SergeyBiryukov
8 years ago

  • Keywords needs-patch good-first-bug added

@choongsavvii
8 years ago

#3 @choongsavvii
8 years ago

  • Keywords needs-patch removed

First time contributor here, at WordCamp NL. At first I thought this was not a good idea, as we would be duplicating the documentation, but our core team guide at the venue (John) explained the codex would move to developer.wordpress.org, where the documentation would be generated from the doc comments. So, this seemed like a simple one to start off with.

Also, it seemed logical to remove the 'needs-patch' tag, so I did. Hope that's OK.

#4 @johnbillion
8 years ago

  • Keywords has-patch added

#5 @grapplerulrich
8 years ago

The reference in seems to point to it's self. I think you meant See get_the_author_meta(). I would have documented the list of parameters under @param string $field instead of higher up. If John mentioned to do it differently then that is best.

The reason to document is so that it can be processed and be added to https://developer.wordpress.org/reference/functions/get_the_author_meta/

#6 @choongsavvii
8 years ago

Oops, sloppy sloppy. Thanks, I corrected this in 38258.2.patch.

@johnbillion indeed mentioned to do it in the description section. It does seem neater to do it in the description imo. Incidentally, further down that same file there is a doccomment for wp_list_authors() which lists fields at the @param. It's more difficult to read, sort alphabetically, or make changes in - plus, any changes will be harder to spot in diffs.

#7 @DrewAPicture
7 years ago

  • Milestone changed from Awaiting Review to 4.9

@choongsavvii Thanks for the patch. I'm going to make some minor formatting changes on commit, but this is ready to go in!

#8 @DrewAPicture
7 years ago

  • Owner set to DrewAPicture
  • Resolution set to fixed
  • Status changed from new to closed

In 40952:

Docs: List out accepted values for the $field parameter in get_the_author_meta().

Props choongsavvii.
Fixes #38258.

Note: See TracTickets for help on using tickets.