From 2b1150483ed7a8186d542b359444dc27add2ba53 Mon Sep 17 00:00:00 2001 From: Ben Speakman Date: Sun, 12 Apr 2015 18:59:03 +0100 Subject: [PATCH] Author fix and tag posts --- src/Cyberduck/LaravelWpApi/WpApi.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Cyberduck/LaravelWpApi/WpApi.php b/src/Cyberduck/LaravelWpApi/WpApi.php index 3fce721..597b906 100755 --- a/src/Cyberduck/LaravelWpApi/WpApi.php +++ b/src/Cyberduck/LaravelWpApi/WpApi.php @@ -33,11 +33,6 @@ public function page($slug) return $this->_get('posts', ['type' => 'page', 'filter' => ['name' => $slug]]); } - public function author($name) - { - return $this->_get('posts', ['type' => 'page', 'filter' => ['author_name' => $name]]); - } - public function categories() { return $this->_get('taxonomies/category/terms'); @@ -53,6 +48,16 @@ public function category_posts($slug, $page = null) return $this->_get('posts', ['page' => $page, 'filter' => ['category_name' => $slug]]); } + public function author_posts($name, $page = null) + { + return $this->_get('posts', ['page' => $page, 'filter' => ['author_name' => $name]]); + } + + public function tag_posts($tags, $page = null) + { + return $this->_get('posts', ['page' => $page, 'filter' => ['tag' => $tags]]); + } + public function search($query, $page = null) { return $this->_get('posts', ['page' => $page, 'filter' => ['s' => $query]]);