Skip to content
This repository was archived by the owner on Aug 28, 2021. It is now read-only.

Commit 2b11504

Browse files
author
Ben Speakman
committed
Author fix and tag posts
1 parent a454a10 commit 2b11504

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/Cyberduck/LaravelWpApi/WpApi.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ public function page($slug)
3333
return $this->_get('posts', ['type' => 'page', 'filter' => ['name' => $slug]]);
3434
}
3535

36-
public function author($name)
37-
{
38-
return $this->_get('posts', ['type' => 'page', 'filter' => ['author_name' => $name]]);
39-
}
40-
4136
public function categories()
4237
{
4338
return $this->_get('taxonomies/category/terms');
@@ -53,6 +48,16 @@ public function category_posts($slug, $page = null)
5348
return $this->_get('posts', ['page' => $page, 'filter' => ['category_name' => $slug]]);
5449
}
5550

51+
public function author_posts($name, $page = null)
52+
{
53+
return $this->_get('posts', ['page' => $page, 'filter' => ['author_name' => $name]]);
54+
}
55+
56+
public function tag_posts($tags, $page = null)
57+
{
58+
return $this->_get('posts', ['page' => $page, 'filter' => ['tag' => $tags]]);
59+
}
60+
5661
public function search($query, $page = null)
5762
{
5863
return $this->_get('posts', ['page' => $page, 'filter' => ['s' => $query]]);

0 commit comments

Comments
 (0)