Make WordPress Core

Changeset 14495


Ignore:
Timestamp:
05/07/2010 03:24:47 AM (16 years ago)
Author:
nacin
Message:

Standardize returned array keys when output = 'names'. Return numeric keys. Standardizes get_object_taxonomies with get_taxonomies, get_post_types, and get_post_stati. props scribu. fixes #13109.

File:
1 edited

Legend:

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

    r14410 r14495  
    29342934    foreach ( $list as $key => $obj ) {
    29352935        $matched = count(array_intersect_assoc(get_object_vars($obj), $args));
    2936         if ( ('and' == $operator && $matched == $count) || ('or' == $operator && $matched <= $count) )
    2937             $filtered[$key] = $field ? $obj->$field : $obj;
     2936        if ( ('and' == $operator && $matched == $count) || ('or' == $operator && $matched <= $count) ) {
     2937            if ( $field )
     2938                $filtered[] = $obj->$field;
     2939            else
     2940                $filtered[$key] = $obj;
     2941        }
    29382942    }
    29392943
Note: See TracChangeset for help on using the changeset viewer.