Skip to content

Commit 75d435a

Browse files
committed
Merge remote-tracking branch 'origin/filip/v16/no-limit-for-celebration' into develop
2 parents 5f29d4c + 7989f52 commit 75d435a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

classes/admin/class-enqueue.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ public function localize_script( $handle, $localize_data = [] ) {
216216
$pending_celebration_tasks = \progress_planner()->get_suggested_tasks()->get_tasks_in_rest_format(
217217
[
218218
'post_status' => 'pending',
219+
'posts_per_page' => 100,
219220
'exclude_provider' => [ 'user' ],
220221
]
221222
);

classes/class-suggested-tasks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ public function get_tasks_in_rest_format( array $args = [] ) {
456456
'post_status' => 'publish',
457457
'exclude_provider' => [],
458458
'include_provider' => [],
459+
'posts_per_page' => 0,
459460
]
460461
);
461462

@@ -481,7 +482,7 @@ public function get_tasks_in_rest_format( array $args = [] ) {
481482
$category_tasks = \progress_planner()->get_suggested_tasks_db()->get_tasks_by(
482483
[
483484
'category' => $category_slug,
484-
'posts_per_page' => $max_items,
485+
'posts_per_page' => 0 < $args['posts_per_page'] ? $args['posts_per_page'] : $max_items,
485486
'post_status' => $args['post_status'],
486487
]
487488
);

0 commit comments

Comments
 (0)