Skip to content

Commit

Permalink
add ability to set offset in taxonomy query
Browse files Browse the repository at this point in the history
  • Loading branch information
pagegwood committed Mar 3, 2018
1 parent fb08e64 commit 4d622a8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ public function taxonomy($taxonomy)
return $this;
}

public function offset($offset)
{
if (is_int($offset)) {
$this->setQueryVar('offset', $offset);
} else {
throw new InvalidArgumentException();
}

return $this;
}

public function orderBy($orderby = 'name', $order = 'ASC')
{
$this->setQueryVar('orderby', $orderby);
Expand Down

0 comments on commit 4d622a8

Please sign in to comment.