Skip to content

Commit 75fc146

Browse files
authored
Merge pull request #146 from ProgressPlanner/develop
v2.1.3
2 parents 9686b04 + 366d7e7 commit 75fc146

File tree

5 files changed

+90
-16
lines changed

5 files changed

+90
-16
lines changed

comment-hacks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @wordpress-plugin
66
* Plugin Name: Comment Experience
7-
* Version: 2.1.2
7+
* Version: 2.1.3
88
* Plugin URI: https://progressplanner.com/plugins/comment-experience/
99
* Description: Improve the comment experience on your site. Adds lots of features to make commenting easier and more engaging.
1010
* Requires PHP: 7.4
@@ -35,7 +35,7 @@
3535
/**
3636
* Used for version checks.
3737
*/
38-
define( 'EMILIA_COMMENT_HACKS_VERSION', '2.1.1' );
38+
define( 'EMILIA_COMMENT_HACKS_VERSION', '2.1.3' );
3939

4040
/**
4141
* Used for asset embedding.

inc/progress-planner/comment-moderation.php

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/**
1212
* Task for the comment moderation.
13+
*
14+
* @property string $url
1315
*/
1416
class Comment_Moderation extends Repetitive {
1517

@@ -34,6 +36,35 @@ class Comment_Moderation extends Repetitive {
3436
*/
3537
protected const CAPABILITY = 'moderate_comments';
3638

39+
/**
40+
* Constructor.
41+
*
42+
* @property string $url
43+
*
44+
* @return void
45+
*/
46+
public function __construct() {
47+
$this->url = \admin_url( 'edit-comments.php?comment_status=moderated' );
48+
}
49+
50+
/**
51+
* Get the title.
52+
*
53+
* @return string
54+
*/
55+
public function get_title() {
56+
return \esc_html__( 'Moderate comments', 'comment-hacks' );
57+
}
58+
59+
/**
60+
* Get the description.
61+
*
62+
* @return string
63+
*/
64+
public function get_description() {
65+
return \esc_html__( 'Moderate comments to make sure they are not spam.', 'comment-hacks' );
66+
}
67+
3768
/**
3869
* Check if the task should be added.
3970
*
@@ -74,13 +105,13 @@ public function get_task_details( $task_id = '' ) {
74105

75106
return [
76107
'task_id' => $task_id,
77-
'title' => \esc_html__( 'Moderate comments', 'comment-hacks' ),
108+
'title' => $this->get_title(),
78109
'parent' => 0,
79110
'priority' => 'high',
80111
'category' => $this->get_provider_category(),
81112
'points' => 1,
82-
'url' => $this->capability_required() ? \esc_url( \admin_url( 'edit-comments.php?comment_status=moderated' ) ) : '',
83-
'description' => '<p>' . \esc_html__( 'Moderate comments to make sure they are not spam.', 'comment-hacks' ) . '</p>',
113+
'url' => $this->get_url(),
114+
'description' => $this->get_description(),
84115
];
85116
}
86117
}

inc/progress-planner/comment-policy.php

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
/**
1313
* Task for the comment policy.
1414
*
15-
* @property string $title
16-
* @property string $description
1715
* @property string $url
1816
*/
1917
class Comment_Policy extends One_Time {
@@ -41,17 +39,36 @@ class Comment_Policy extends One_Time {
4139

4240
/**
4341
* Class constructor.
42+
*
43+
* @property string $url
44+
*
45+
* @return void
4446
*/
4547
public function __construct() {
4648
$this->options = Hacks::get_options();
49+
$this->url = \admin_url( 'options-general.php?page=comment-experience#top#comment-policy' );
50+
}
4751

48-
$this->title = \esc_html__( 'Implement a comment policy', 'comment-hacks' );
49-
$this->description = \sprintf(
52+
/**
53+
* Get the title.
54+
*
55+
* @return string
56+
*/
57+
public function get_title() {
58+
return \esc_html__( 'Implement a comment policy', 'comment-hacks' );
59+
}
60+
61+
/**
62+
* Get the description.
63+
*
64+
* @return string
65+
*/
66+
public function get_description() {
67+
return \sprintf(
5068
/* translators: %s:<a href="https://prpl.fyi/comment-policy" target="_blank">comment policy</a> link */
5169
\esc_html__( 'Implement a %s to make sure your commenters know what they can and cannot do.', 'comment-hacks' ),
5270
'<a href="https://prpl.fyi/comment-policy" target="_blank">' . \esc_html__( 'comment policy', 'comment-hacks' ) . '</a>'
5371
);
54-
$this->url = \admin_url( 'options-general.php?page=comment-policy#top#comment-policy' );
5572
}
5673

5774
/**

inc/progress-planner/comment-redirect.php

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
/**
1313
* Task for the comment redirect.
1414
*
15-
* @property string $title
16-
* @property string $description
1715
* @property string $url
1816
*/
1917
class Comment_Redirect extends One_Time {
@@ -41,17 +39,36 @@ class Comment_Redirect extends One_Time {
4139

4240
/**
4341
* Class constructor.
42+
*
43+
* @property string $url
44+
*
45+
* @return void
4446
*/
4547
public function __construct() {
4648
$this->options = Hacks::get_options();
49+
$this->url = \admin_url( 'options-general.php?page=comment-experience#top#comment-redirect' );
50+
}
4751

48-
$this->title = \esc_html__( 'Implement a comment redirect', 'comment-hacks' );
49-
$this->description = \sprintf(
52+
/**
53+
* Get the title.
54+
*
55+
* @return string
56+
*/
57+
public function get_title() {
58+
return \esc_html__( 'Implement a comment redirect', 'comment-hacks' );
59+
}
60+
61+
/**
62+
* Get the description.
63+
*
64+
* @return string
65+
*/
66+
public function get_description() {
67+
return \sprintf(
5068
/* translators: %s:<a href="https://prpl.fyi/comment-redirect" target="_blank">comment redirect</a> link */
5169
\esc_html__( 'Implement a %s to thank first-time commenters for their comment.', 'comment-hacks' ),
5270
'<a href="https://prpl.fyi/comment-policy" target="_blank">' . \esc_html__( 'comment redirect', 'comment-hacks' ) . '</a>'
5371
);
54-
$this->url = \admin_url( 'options-general.php?page=comment-policy#top#comment-redirect' );
5572
}
5673

5774
/**

readme.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: comments, spam, emails
44
Text Domain: comment-hacks
55
Requires at least: 5.9
66
Tested up to: 6.8
7-
Stable tag: 2.1.2
7+
Stable tag: 2.1.3
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010
Requires PHP: 7.4
@@ -59,6 +59,15 @@ If you have bugs to report, please go to [the plugin's GitHub repository](https:
5959

6060
== Changelog ==
6161

62+
= 2.1.3 =
63+
64+
* Add necessary compatibility to Progress Planner integration for the upcoming WordPress 6.8.
65+
66+
= 2.1.2 =
67+
68+
* Rename the plugin from "Comment Hacks" to "Comment Experience".
69+
* Bring up to date with changes in Progress Planner
70+
6271
= 2.1.1 =
6372

6473
* Don't enqueue the remove URL script on the frontend for logged out users or users without the `edit_posts` capability.

0 commit comments

Comments
 (0)