This commit is contained in:
Matthias Pfefferle 2023-07-07 15:09:22 +02:00
parent 4b8ffc874a
commit 7f3d31c59e

View file

@ -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 ) {