You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: classes/suggested-tasks/providers/interactive/class-email-sending.php
+44-15Lines changed: 44 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,13 @@ class Email_Sending extends Interactive {
35
35
*/
36
36
constCATEGORY = 'configuration';
37
37
38
+
/**
39
+
* Whether the task is dismissable.
40
+
*
41
+
* @var bool
42
+
*/
43
+
protected$is_dismissable = true;
44
+
38
45
/**
39
46
* The popover ID.
40
47
*
@@ -84,6 +91,24 @@ public function init() {
84
91
$this->email_content = sprintf( \esc_html__( 'This is a test email. Complete the task by clicking the link: %s', 'progress-planner' ), \admin_url( 'admin.php?page=progress-planner&prpl_complete_task=' . $this->get_task_id() ) );
85
92
}
86
93
94
+
/**
95
+
* Get the title.
96
+
*
97
+
* @return string
98
+
*/
99
+
publicfunctionget_title() {
100
+
return\esc_html__( 'Test if your website can send emails correctly', 'progress-planner' );
101
+
}
102
+
103
+
/**
104
+
* Get the description.
105
+
*
106
+
* @return string
107
+
*/
108
+
publicfunctionget_description() {
109
+
return\esc_html__( 'Test if your website can send emails correctly', 'progress-planner' );
110
+
}
111
+
87
112
/**
88
113
* Enqueue the scripts.
89
114
*
@@ -163,16 +188,17 @@ public function the_popover_content() {
<h2 class="prpl-interactive-task-title"><?php\esc_html_e( 'Test if your site can send emails', 'progress-planner' ); ?></h2>
166
-
<p class="prpl-interactive-task-description"><?php\esc_html_e( 'Your WordPress website sometimes needs to send transactional email. For example, to reset passwords, when a fatal error occurs, or comment notifications. And oftentimes contactforms also try to send email. It is therefore important to verify that those emails are actually sent. Start by filling out your email address to send a test.', 'progress-planner' ); ?></p>
191
+
<p class="prpl-interactive-task-description"><?php\esc_html_e( 'Your WordPress site sometimes needs to send emails. For example, to reset a password, send a comment notification, or warn you when something breaks. Contact forms also use email.', 'progress-planner' ); ?></p>
192
+
<p class="prpl-interactive-task-description"><?php\esc_html_e( 'It’s important to check if these emails are actually sent. Enter your email address on the right to get a test email.', 'progress-planner' ); ?></p>
167
193
</div>
168
194
<div class="prpl-column">
169
-
<p><?php\esc_html_e( 'To what email address should we send the test email?', 'progress-planner' ); ?></p>
195
+
<p><?php\esc_html_e( 'Where should we send the test email?', 'progress-planner' ); ?></p>
<?php\esc_html_e( 'Usually our test email should arrive within a few minutes. In rare cases, it can take up to several hours for our test to arrive in your inbox.', 'progress-planner' ); ?>
201
+
<?php\esc_html_e( 'You should get the email in a few minutes. In rare cases, it might take a few hours.', 'progress-planner' ); ?>
printf( \esc_attr__( 'We\'ve just tried to send an email titled "%s" to "[EMAIL_ADDRESS]". Unfortunately this failed with the following error message: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_subject ) );
226
+
printf( \esc_attr__( 'We just tried to send the email "%s" to [EMAIL_ADDRESS], but it didn’t work. The error message was: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_subject ) );
204
227
?>
205
228
"></p>
206
229
230
+
</div>
231
+
232
+
<div class="prpl-column">
233
+
<p><?php\esc_html_e( 'Please fix the issue and try again.', 'progress-planner' ); ?></p>
printf( \esc_attr__( 'We\'ve just tried to send an email titled "%s" to "[EMAIL_ADDRESS]". Usually our test email should arrive within a few minutes. In rare cases, it can take up to several hours for our test to arrive in your inbox.', 'progress-planner' ), \esc_attr( $this->email_subject ) );
249
+
printf( \esc_attr__( 'We just sent the email "%s" to [EMAIL_ADDRESS]. It usually arrives within a few minutes. In rare cases, it might take a few hours.', 'progress-planner' ), \esc_attr( $this->email_subject ) );
221
250
?>
222
251
"></p>
223
252
@@ -266,7 +295,7 @@ public function the_popover_content() {
<?php\esc_html_e( 'We\'re happy to hear you\'ve received our test email. This indicates email is set up properly on your website.', 'progress-planner' ); ?>
298
+
<?php\esc_html_e( 'Great, you received the test email! That means email is working correctly on your website.', 'progress-planner' ); ?>
270
299
</div>
271
300
272
301
<div class="prpl-column">
@@ -323,15 +352,15 @@ public function get_task_details( $task_id = '' ) {
323
352
324
353
return [
325
354
'task_id' => $task_id,
326
-
'title' => \esc_html__( 'Test if your site can send emails', 'progress-planner'),
0 commit comments