Set 'cat' query var for backwards compatibility. Fixes #15007

git-svn-id: http://svn.automattic.com/wordpress/trunk@15685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu
2010-10-02 18:03:06 +00:00
parent 88868f5ba5
commit 70728369f9
2 changed files with 16 additions and 1 deletions

View File

@@ -3033,7 +3033,7 @@ function wp_filter_object_list( $list, $args = array(), $operator = 'and', $fiel
$filtered = array();
foreach ( $list as $key => $obj ) {
$matched = count(array_intersect_assoc(get_object_vars($obj), $args));
$matched = count( array_intersect_assoc( (array) ($obj), $args ) );
if ( ('and' == $operator && $matched == $count) || ('or' == $operator && $matched <= $count) ) {
if ( $field )
$filtered[] = $obj->$field;