Introduce the wp_filter_object_list() helper, with an $operator arg. Fixes an intersection bug in get_post_types() and get_taxonomies(). Also switches $operator default from 'or' to 'and' for get_post_stati(). props scribu, fixes #12966.

git-svn-id: https://develop.svn.wordpress.org/trunk@14108 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2010-04-16 14:08:58 +00:00
parent e3e9a8e5c8
commit 028f262ccf
4 changed files with 57 additions and 67 deletions

View File

@@ -2255,7 +2255,7 @@ class WP_Query {
if ( is_admin() ) {
// Add protected states that should show in the admin all list.
$admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true), 'names', 'and' );
$admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
foreach ( (array) $admin_all_states as $state )
$where .= " OR $wpdb->posts.post_status = '$state'";
}