diff --git a/singletons/introspector.php b/singletons/introspector.php index 35fc63a..f39d215 100644 --- a/singletons/introspector.php +++ b/singletons/introspector.php @@ -289,6 +289,26 @@ protected function set_posts_query($query = false) { $query['post_type'] = $json_api->query->post_type; } + if ($json_api->query->post_status) { + $query['post_status'] = $json_api->query->post_status; + } + + if ($json_api->query->category_id) { + $query['cat'] = $json_api->query->category_id; + } + + if ($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; + } + + if ($json_api->query->tag_slug) { + $query['tag'] = $json_api->query->tag_slug; + } + if (!empty($query)) { query_posts($query); } diff --git a/singletons/query.php b/singletons/query.php index f01e906..c78d1c3 100644 --- a/singletons/query.php +++ b/singletons/query.php @@ -57,7 +57,8 @@ function wp_query_var($key) { 'author_slug' => 'author_name', 'search' => 's', 'order' => 'order', - 'order_by' => 'orderby' + 'order_by' => 'orderby', + 'post_status' => 'post_status' ); if ($key == 'date') { $date = null;