| @@ 221-228 (lines=8) @@ | ||
| 218 | $query['post__not_in'] = isset( $query['post__not_in'] ) ? array_merge( $query['post__not_in'], $exclude_tree ) : $exclude_tree; |
|
| 219 | } |
|
| 220 | ||
| 221 | if ( isset( $args['category'] ) ) { |
|
| 222 | $category = get_term_by( 'slug', $args['category'], 'category' ); |
|
| 223 | if ( $category === false) { |
|
| 224 | $query['category_name'] = $args['category']; |
|
| 225 | } else { |
|
| 226 | $query['cat'] = $category->term_id; |
|
| 227 | } |
|
| 228 | } |
|
| 229 | ||
| 230 | if ( isset( $args['tag'] ) ) { |
|
| 231 | $query['tag'] = $args['tag']; |
|
| @@ 230-237 (lines=8) @@ | ||
| 227 | $query['post__not_in'] = isset( $query['post__not_in'] ) ? array_merge( $query['post__not_in'], $exclude_tree ) : $exclude_tree; |
|
| 228 | } |
|
| 229 | ||
| 230 | if ( isset( $args['category'] ) ) { |
|
| 231 | $category = get_term_by( 'slug', $args['category'], 'category' ); |
|
| 232 | if ( $category === false) { |
|
| 233 | $query['category_name'] = $args['category']; |
|
| 234 | } else { |
|
| 235 | $query['cat'] = $category->term_id; |
|
| 236 | } |
|
| 237 | } |
|
| 238 | ||
| 239 | if ( isset( $args['tag'] ) ) { |
|
| 240 | $query['tag'] = $args['tag']; |
|