Skip to content

Commit 294ab46

Browse files
authored
Merge pull request #482 from ProgressPlanner/develop
v1.4.2
2 parents dd3edf9 + 620d8b1 commit 294ab46

File tree

9 files changed

+67
-63
lines changed

9 files changed

+67
-63
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
= 1.4.2 =
2+
3+
Bugs we fixed:
4+
5+
* Fixed snoozing some of Yoast SEO Recommendations.
6+
17
= 1.4.1 =
28

39
Bugs we fixed:

classes/suggested-tasks/providers/class-remove-terms-without-posts.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,21 +245,27 @@ protected function is_specific_task_completed( $task_id ) {
245245
public function get_tasks_to_inject() {
246246

247247
if (
248+
true === $this->is_task_snoozed() ||
248249
! $this->should_add_task() // No need to add the task.
249250
) {
250251
return [];
251252
}
252253

253-
$data = $this->data_collector->collect();
254+
$data = $this->data_collector->collect();
255+
$task_id = $this->get_task_id(
256+
[
257+
'term_id' => $data['term_id'],
258+
'taxonomy' => $data['taxonomy'],
259+
]
260+
);
261+
262+
if ( true === \progress_planner()->get_suggested_tasks()->was_task_completed( $task_id ) ) {
263+
return [];
264+
}
254265

255266
return [
256267
[
257-
'task_id' => $this->get_task_id(
258-
[
259-
'term_id' => $data['term_id'],
260-
'taxonomy' => $data['taxonomy'],
261-
]
262-
),
268+
'task_id' => $task_id,
263269
'provider_id' => $this->get_provider_id(),
264270
'category' => $this->get_provider_category(),
265271
'term_id' => $data['term_id'],

classes/suggested-tasks/providers/class-tasks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public function get_tasks_to_inject() {
410410
if (
411411
true === $this->is_task_snoozed() ||
412412
! $this->should_add_task() || // No need to add the task.
413-
true === \progress_planner()->get_suggested_tasks()->was_task_completed( $this->get_task_id() )
413+
true === \progress_planner()->get_suggested_tasks()->was_task_completed( $task_id )
414414
) {
415415
return [];
416416
}

classes/suggested-tasks/providers/class-update-term-description.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,21 +238,27 @@ protected function is_specific_task_completed( $task_id ) {
238238
public function get_tasks_to_inject() {
239239

240240
if (
241+
true === $this->is_task_snoozed() ||
241242
! $this->should_add_task() // No need to add the task.
242243
) {
243244
return [];
244245
}
245246

246-
$data = $this->data_collector->collect();
247+
$data = $this->data_collector->collect();
248+
$task_id = $this->get_task_id(
249+
[
250+
'term_id' => $data['term_id'],
251+
'taxonomy' => $data['taxonomy'],
252+
]
253+
);
254+
255+
if ( true === \progress_planner()->get_suggested_tasks()->was_task_completed( $task_id ) ) {
256+
return [];
257+
}
247258

248259
return [
249260
[
250-
'task_id' => $this->get_task_id(
251-
[
252-
'term_id' => $data['term_id'],
253-
'taxonomy' => $data['taxonomy'],
254-
]
255-
),
261+
'task_id' => $task_id,
256262
'provider_id' => $this->get_provider_id(),
257263
'category' => $this->get_provider_category(),
258264
'term_id' => $data['term_id'],

classes/suggested-tasks/providers/integrations/yoast/class-cornerstone-workout.php

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ class Cornerstone_Workout extends Tasks {
5151
*/
5252
protected $is_dismissable = true;
5353

54+
/**
55+
* Whether the task is repetitive.
56+
*
57+
* @var bool
58+
*/
59+
protected $is_repetitive = true;
5460

5561
/**
5662
* The task points.
@@ -167,26 +173,6 @@ public function should_add_task() {
167173
return true;
168174
}
169175

170-
/**
171-
* Get an array of tasks to inject.
172-
*
173-
* @return array
174-
*/
175-
public function get_tasks_to_inject() {
176-
if ( ! $this->should_add_task() ) {
177-
return [];
178-
}
179-
180-
return [
181-
[
182-
'task_id' => $this->get_task_id(),
183-
'provider_id' => $this->get_provider_id(),
184-
'category' => $this->get_provider_category(),
185-
'date' => \gmdate( 'YW' ),
186-
],
187-
];
188-
}
189-
190176
/**
191177
* Get the task details.
192178
*

classes/suggested-tasks/providers/integrations/yoast/class-fix-orphaned-content.php

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,27 @@ protected function is_specific_task_completed( $task_id ) {
197197
public function get_tasks_to_inject() {
198198

199199
if (
200+
true === $this->is_task_snoozed() ||
200201
! $this->should_add_task() // No need to add the task.
201202
) {
202203
return [];
203204
}
204205

205-
$data = $this->data_collector->collect();
206+
$data = $this->data_collector->collect();
207+
$task_id = $this->get_task_id(
208+
[
209+
'post_id' => $data['post_id'],
210+
]
211+
);
212+
213+
// When we have data, check if task was completed.
214+
if ( true === \progress_planner()->get_suggested_tasks()->was_task_completed( $task_id ) ) {
215+
return [];
216+
}
206217

207218
return [
208219
[
209-
'task_id' => $this->get_task_id(
210-
[
211-
'post_id' => $data['post_id'],
212-
]
213-
),
220+
'task_id' => $task_id,
214221
'provider_id' => $this->get_provider_id(),
215222
'category' => $this->get_provider_category(),
216223
'post_id' => $data['post_id'],

classes/suggested-tasks/providers/integrations/yoast/class-orphaned-content-workout.php

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class Orphaned_Content_Workout extends Tasks {
5151
*/
5252
protected $is_dismissable = true;
5353

54+
/**
55+
* Whether the task is repetitive.
56+
*
57+
* @var bool
58+
*/
59+
protected $is_repetitive = true;
60+
5461
/**
5562
* The task points.
5663
*
@@ -166,26 +173,6 @@ public function should_add_task() {
166173
return true;
167174
}
168175

169-
/**
170-
* Get an array of tasks to inject.
171-
*
172-
* @return array
173-
*/
174-
public function get_tasks_to_inject() {
175-
if ( ! $this->should_add_task() ) {
176-
return [];
177-
}
178-
179-
return [
180-
[
181-
'task_id' => $this->get_task_id(),
182-
'provider_id' => $this->get_provider_id(),
183-
'category' => $this->get_provider_category(),
184-
'date' => \gmdate( 'YW' ),
185-
],
186-
];
187-
}
188-
189176
/**
190177
* Get the task details.
191178
*

progress-planner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Description: A plugin to help you fight procrastination and get things done.
1010
* Requires at least: 6.3
1111
* Requires PHP: 7.4
12-
* Version: 1.4.1
12+
* Version: 1.4.2
1313
* Author: Team Emilia Projects
1414
* Author URI: https://prpl.fyi/about
1515
* License: GPL-3.0+

readme.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: planning, maintenance, writing, blogging
44
Requires at least: 6.3
55
Tested up to: 6.8
66
Requires PHP: 7.4
7-
Stable tag: 1.4.1
7+
Stable tag: 1.4.2
88
License: GPL3+
99
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
1010

@@ -110,6 +110,12 @@ https://youtu.be/e1bmxZYyXFY
110110

111111
== Changelog ==
112112

113+
= 1.4.2 =
114+
115+
Bugs we fixed:
116+
117+
* Fixed snoozing some of Yoast SEO Recommendations.
118+
113119
= 1.4.1 =
114120

115121
Bugs we fixed:

0 commit comments

Comments
 (0)