Make WordPress Core

Opened 7 years ago

Closed 3 years ago

#42156 closed enhancement (fixed)

Adjust the inline docs for get_sites() to avoid WP_Site_Query doc-duplication

Reported by: birgire's profile birgire Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version: 4.6
Component: Networks and Sites Keywords: good-first-bug has-patch commit
Focuses: docs, multisite Cc:


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:




Related #42117

Attachments (3)

42156.diff (4.7 KB) - added by felipeelia 7 years ago.
42156.2.diff (4.7 KB) - added by felipeelia 7 years ago.
42156.3.diff (4.8 KB) - added by audrasjb 3 years ago.
patch refreshed against trunk

Download all attachments as: .zip

Change History (15)

#1 @birgire
7 years ago

I think this would be a good-first-bug, but I can't mark it as such.

#2 @johnbillion
7 years ago

  • Keywords needs-patch good-first-bug added

7 years ago

#3 @felipeelia
7 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 @birgire
7 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.

7 years ago

#5 @felipeelia
7 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 @DrewAPicture
6 years ago

  • Owner set to DrewAPicture
  • Status changed from new to 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.

3 years ago

#8 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 5.8
  • Owner changed from DrewAPicture to SergeyBiryukov

#9 @desrosj
3 years ago

Today is 5.8 feature freeze. However, this ticket only touches inline documentation, so it can remain for the time being.

#10 @audrasjb
3 years ago

  • Keywords needs-refresh added

This needs to be refreshed as get_sites() now belongs to wp-includes/ms-site.php :)

3 years ago

patch refreshed against trunk

#11 @audrasjb
3 years ago

  • Keywords commit added; needs-refresh removed

#12 @SergeyBiryukov
3 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 51184:

Docs: Add a reference to WP_Site_Query::__construct() for information on accepted arguments in get_sites().

Synchronize the documentation between two places, use WP_Site_Query::__construct() as the canonical source.

Follow-up to [37616].

Props birgire, felipeelia, audrasjb.
Fixes #42156.

Note: See TracTickets for help on using tickets.