Changeset 15685
- Timestamp:
- 10/02/2010 06:03:06 PM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r15680 r15685 3034 3034 3035 3035 foreach ( $list as $key => $obj ) { 3036 $matched = count( array_intersect_assoc(get_object_vars($obj), $args));3036 $matched = count( array_intersect_assoc( (array) ($obj), $args ) ); 3037 3037 if ( ('and' == $operator && $matched == $count) || ('or' == $operator && $matched <= $count) ) { 3038 3038 if ( $field ) -
trunk/wp-includes/query.php
r15672 r15685 1949 1949 else 1950 1950 $where .= ' AND 0 = 1'; 1951 1952 // Back-compat 1953 if ( !empty( $ids ) ) { 1954 $cat_query = wp_filter_object_list( $tax_query, array( 'taxonomy' => 'category' ) ); 1955 if ( !empty( $cat_query ) ) { 1956 $cat_query = reset( $cat_query ); 1957 $cat = get_term_by( $cat_query['field'], $cat_query['terms'][0], 'category' ); 1958 if ( $cat ) { 1959 $this->set('cat', $cat->term_id); 1960 $this->set('category_name', $cat->slug); 1961 } 1962 } 1963 } 1964 1965 unset( $ids ); 1951 1966 } 1952 1967
Note: See TracChangeset
for help on using the changeset viewer.