Opened 8 years ago
Closed 6 years ago
#34726 closed defect (bug) (fixed)
Clarify class variable documentation on WP_Query
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Query | Keywords: | good-first-bug has-patch |
Focuses: | docs | Cc: |
Description
Most of the PHPDoc begins with "Set if query" (e.g. "Set if query contains posts."). However, each of these variables is set. More correct documentation would be "True if query" or similar.
Attachments (5)
Change History (14)
#3
follow-up:
↓ 4
@
8 years ago
- Owner set to megane9988
- Status changed from new to assigned
@megane9988 Thanks for the patch.
Unfortunately what needs to happen here is actually two-fold. The first, as I mentioned in comment:1 is that we need to write actual summaries for these properties. The second is that whether or not the properties default to true should not be in the summary, it should be add as a description for the @var
tags in the property DocBlocks.
For instance, a valid DocBlock for the $is_single
property might look like this:
<?php /** * Used to determine whether the current query is for a single post. * * @since 1.5.0 * @access public * @var bool True if the query is for a single post. Default false. */ public $is_single = false;
Assigning the ticket to mark the good-first-bug as claimed.
#4
in reply to:
↑ 3
@
8 years ago
@DrewAPicture Thanks for your advice.
I updated patch. I added Doc comment in first and second part.
If it is OK, I continue ather part.
#5
@
8 years ago
- Keywords has-patch added; needs-patch removed
- Milestone changed from Awaiting Review to Future Release
@megane9988 Looks like a great start, yep!
More correct documentation would be to actually write summaries for the properties describing what they represent. "True if query" would be useful in the
@var
description, however.