#25130 closed defect (bug) (fixed)
Docblock documentation for WP_Query -> post property
| Reported by: | lgedeon | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Inline Docs | Version: | 3.0 |
| Severity: | normal | Keywords: | needs-patch easy-fix |
| Cc: | Focuses: |
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
@
13 years ago
- Keywords needs-patch easy-fix removed
- Version 3.6 → 3.0
Documentation error partially fixed in 3.1. Appears to date back to at least 3.0 - http://core.trac.wordpress.org/ticket/15105
Version 0, edited 13 years ago by
(next)
#6
@
13 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Care to add a patch?