#2363 closed defect (bug) (invalid)
Better access for generic post_status = object and arbitrary post_type
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.0 |
| Severity: | normal | Keywords: | post_status post_type object WP_Query bg|2nd-opinion bg|has-patch |
| Cc: |
Description
Currently WP_Query makes accessing and cotrolling access to post_status = object posts difficult.
Additionally, wp_insert_post() has no access to the useful post_type field.
The following patch addresses both issues, but needs a second opinion.
NOTE:
$is_dingus is the boolean used to determine if the query in question is one associated with a post_status = object post. $is_object was avoided due to the native PHP function is_object().
Attachments (1)
Change History (6)
What's an "object"? I think the post_type should be more specific. It should be "post", "page", "attachment", ...
I've been using post_status = object, post_type = mb_bit for a plugin I'm playing with that attempts to be somewhat http://backpackit.com/ ish.
The "posts" I'm creating aren't posts or pages or attachments; they're just... generic things. Even though WP allows for the creation of such items, it's not fantastic at accessing them (it can sure be done, though, with some post_where manipulation).
In thinking more, this is really two separate issues. WP_Query accessing objects and wp_insert_post() handling post_type. The fact I want both doesn't mean I should have filed them as the same ticket :)
I've been on slient running for a few months and didn't see your comment on hackers.
http://comox.textdrive.com/pipermail/wp-hackers/2006-February/004443.html
I'm in.
I might close this ticket and start something more meaningful.

changes to classes.php and functions-post.php