WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/16/2010 02:08:58 PM (11 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/query.php

    r14072 r14108  
    22562256            if ( is_admin() ) {
    22572257                // Add protected states that should show in the admin all list.
    2258                 $admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true), 'names', 'and' );
     2258                $admin_all_states = get_post_stati( array('protected' => true, 'show_in_admin_all_list' => true) );
    22592259                foreach ( (array) $admin_all_states as $state )
    22602260                    $where .= " OR $wpdb->posts.post_status = '$state'";
Note: See TracChangeset for help on using the changeset viewer.