Permalink
Browse files

add support for get_posts category param

  • Loading branch information...
1 parent 06b9bc5 commit 0d0c7238fb7407201ef5ff38a3eb709679abf15c @aMoniker aMoniker committed May 6, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 singletons/introspector.php
View
10 singletons/introspector.php
@@ -294,19 +294,21 @@ protected function set_posts_query($query = false) {
}
if ($json_api->query->category_id) {
- $query['cat'] = $json_api->query->category_id;
+ $query['cat'] = $json_api->query->category_id;
+ } else if ($json_api->query->category) {
+ $query['cat'] = $json_api->query->category;
}
if ($json_api->query->category_slug) {
- $query['category_name'] = $json_api->query->category_slug;
+ $query['category_name'] = $json_api->query->category_slug;
}
if ($json_api->query->tag_id) {
- $query['tag_id'] = $json_api->query->tag_id;
+ $query['tag_id'] = $json_api->query->tag_id;
}
if ($json_api->query->tag_slug) {
- $query['tag'] = $json_api->query->tag_slug;
+ $query['tag'] = $json_api->query->tag_slug;
}
if (!empty($query)) {

0 comments on commit 0d0c723

Please sign in to comment.