[wp-trac] [WordPress Trac] #10605: WordPress Shouldn't Mess with post_type
WordPress Trac
wp-trac at lists.automattic.com
Sat Aug 15 02:43:27 UTC 2009
#10605: WordPress Shouldn't Mess with post_type
--------------------------+-------------------------------------------------
Reporter: filosofo | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Query | Version:
Severity: normal | Keywords: post_type, wp_query has-patch
--------------------------+-------------------------------------------------
Comment(by dd32):
> attachment allow_custom_post_type.10605.diff added
I swear i've written that patch before.
Wouldnt it be better off written as:
{{{{
if ( 'any' == $post_type ) {
...
} elseif ( ! empty($post_type) ) {
$where .= " AND $wpdb->posts.post_type = '$post_type'";
} elseif ( is_page....
}}}
But I'm pretty sure it was written like that for a reason.. And i'm 100%
certain theres other tickets for this
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10605#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list