#25130 closed defect (bug) (fixed)
Docblock documentation for WP_Query -> post property
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.7 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Inline Docs | Keywords: | needs-patch easy-fix |
Focuses: | Cc: |
Description
Current docblock for the post property of WP_Query:
/** * The current post ID. * * @since 1.5.0 * @access public * @var object */ var $post;
The $post property contains the current WP_Post object. We need to update the documentation to reflect this.
Attachments (1)
Change History (7)
#2
@
11 years ago
- Keywords needs-patch easy-fix removed
- Version changed from 3.6 to 3.0
Documentation error partially fixed in 3.1. Appears to date back to at least 3.0 - #15105
#4
@
11 years ago
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In 25110:
#6
@
11 years ago
I think [25110] is good as-is. If there is no current post then yes it will contain nothing (which is also how it is defined in the class).
If every class property's type also accounted for the undefined case, you'd need to exclude all objects as you can't instantiate objects when defining a property.
Note: See
TracTickets for help on using
tickets.
Care to add a patch?