Skip to content

Commit f62c855

Browse files
author
Ben Speakman
committed
Add author function
1 parent 08affa3 commit f62c855

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Cyberduck/LaravelWpApi/WpApi.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ 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+
3641
public function categories()
3742
{
3843
return $this->_get('taxonomies/category/terms');

0 commit comments

Comments
 (0)