diff --git a/includes/rest/class-followers.php b/includes/rest/class-followers.php index edd1445..9b9ed89 100644 --- a/includes/rest/class-followers.php +++ b/includes/rest/class-followers.php @@ -80,10 +80,14 @@ class Followers { $json->first = \add_query_arg( 'page', 1, $json->partOf ); // phpcs:ignore $json->last = \add_query_arg( 'page', \ceil ( $json->totalItems / 20 ), $json->partOf ); // phpcs:ignore - if ( $page && ( ( \ceil ( $json->totalItems / 20 ) ) >= $page ) ) { // phpcs:ignore + if ( $page && ( ( \ceil ( $json->totalItems / 20 ) ) > $page ) ) { // phpcs:ignore $json->next = \add_query_arg( 'page', $page + 1, $json->partOf ); // phpcs:ignore } + if ( $page && ( $page > 1 ) ) { // phpcs:ignore + $json->prev = \add_query_arg( 'page', $page - 1, $json->partOf ); // phpcs:ignore + } + // phpcs:ignore $json->orderedItems = array_map( function( $item ) {