Skip to content

Commit c5d38c6

Browse files
committed
Fix application pagination
1 parent bd6d869 commit c5d38c6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/class-wp-rest-oauth1-listtable.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ public function prepare_items() {
1313
'value' => 'oauth1',
1414
),
1515
),
16-
1716
'paged' => $paged,
1817
);
1918

20-
$query = new WP_Query();
21-
$this->items = $query->query( $args );
19+
$query = new WP_Query( $args );
20+
$this->items = $query->posts;
21+
22+
$pagination_args = array(
23+
'total_items' => $query->found_posts,
24+
'total_pages' => $query->max_num_pages,
25+
'per_page' => $query->get('posts_per_page')
26+
);
27+
$this->set_pagination_args( $pagination_args );
2228
}
2329

2430
/**

0 commit comments

Comments
 (0)