Opened 9 years ago
Closed 5 years ago
#42156 closed enhancement (fixed)
Adjust the inline docs for get_sites() to avoid WP_Site_Query doc-duplication
| Reported by: | birgire | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.8 |
| Component: | Networks and Sites | Version: | 4.6 |
| Severity: | normal | Keywords: | good-first-bug has-patch commit |
| Cc: | Focuses: | docs, multisite |
Description
The get_sites() is a wrapper for a WP_Site_Query object, so to avoid doc duplication, we should adjust the inline docs for that function.
Similar to what has been done for the documentation of the get_posts() function, that's a wrapper for a WP_Query object.
Code reference:
get_sites():
https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/ms-blogs.php#L588
WP_Site_Query:
https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/class-wp-site-query.php#L105
get_posts():
https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/post.php#L1646
Related #42117
Attachments (3)
Change History (15)
#3
@
9 years ago
- Keywords has-patch added; needs-patch removed
This is my first contribution, so please tell me if I'm doing something wrong :)
#4
@
9 years ago
Thanks for the patch @felipeelia
That looks good to me - I'm just wondering if we should keep it in one line, instead of two.
Wasn't there any recommended maximum length of comments? It would be informative to check that.
#5
@
9 years ago
Thanks @birgire!
I found a recommendation here. It can be 120 characters wide, maintaining it in one line we get just 108 (with indentation).
#6
@
9 years ago
- Owner set to
- Status new → reviewing
Hi @felipeelia, thanks for the patches! I'll review them and get back to you with any feedback I might have.
This ticket was mentioned in Slack in #core by sergey. View the logs.
6 years ago
#9
@
5 years ago
Today is 5.8 feature freeze. However, this ticket only touches inline documentation, so it can remain for the time being.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I think this would be a good-first-bug, but I can't mark it as such.