[wp-trac] [WordPress Trac] #49093: get_posts Some fields of the $args argument are not documented

WordPress Trac noreply at wordpress.org
Sun Dec 29 20:51:43 UTC 2019


#49093: get_posts Some fields of the $args argument are not documented
----------------------------+------------------------------
 Reporter:  Marcio Zebedeu  |       Owner:  (none)
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  General         |     Version:  trunk
 Severity:  minor           |  Resolution:
 Keywords:  close           |     Focuses:  docs
----------------------------+------------------------------

Comment (by SergeyBiryukov):

 Hi there, welcome to WordPress Trac! Thanks for the ticket:

 There was a previous discussion on this in comment:2:ticket:47896:
 > @birgire: The way I see it now, is that it's good if we can **avoid
 duplicating the documentation** of input arguments if possible and only
 document it if it's a part of the corresponding function's code base. Then
 e.g. refer to the other places where the other "hidden" but supported
 input arguments are documented.
 and comment:8:ticket:47896:
 > @boonebgorges: I agree with this. I'd spell out the principle as
 follows:
 >
 > 1. If a function accepts arguments that are passed through, without
 modification, to another function, then those arguments should not be
 documented on the wrapper function, but there should be a reference along
 the lines of `See get_terms()` in the description of `$args`.
 > 2. The wrapper function should fully document arguments that (a) are not
 passed through at all (such as `$title_li`) or (b) are modified or play a
 special role in the wrapper (such as `$exclude_tree`).

 It was also previously discussed in #41058, specifically
 comment:8:ticket:41058.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49093#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list