Skip to content

Commit d1affaa

Browse files
committed
minor tweaks - mostly indentation
1 parent d661a22 commit d1affaa

1 file changed

Lines changed: 34 additions & 53 deletions

File tree

classes/suggested-tasks/providers/interactive/class-email-sending.php

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,8 @@ public function ajax_test_email_sending() {
236236

237237
if ( $result ) {
238238
wp_send_json_success( \esc_html__( 'Email sent successfully.', 'progress-planner' ) );
239-
} else {
240-
wp_send_json_error( $this->email_error );
241239
}
240+
wp_send_json_error( $this->email_error );
242241
}
243242

244243
/**
@@ -285,10 +284,10 @@ public function the_popover_content() {
285284

286285
<div class="prpl-steps-nav-wrapper">
287286
<button class="prpl-button" data-action="showResults" type="submit">
288-
<?php
287+
<?php
289288
/* translators: %s is a forward arrow icon. */
290289
printf( \esc_html__( 'Next step %s', 'progress-planner' ), '<span class="dashicons dashicons-arrow-right-alt2"></span>' );
291-
?>
290+
?>
292291
</button>
293292
</div>
294293
</form>
@@ -300,10 +299,13 @@ public function the_popover_content() {
300299
<div class="prpl-column prpl-column-content">
301300
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'We tried to send a test email', 'progress-planner' ); ?></h2>
302301
<p class="prpl-interactive-task-description" id="prpl-sending-email-error-occurred-message" data-email-message="
303-
<?php
304-
/* translators: %s is the email subject. */
305-
printf( \esc_attr__( 'We just tried to send the email "%s" to [EMAIL_ADDRESS], but unfortunately it didn’t work.', 'progress-planner' ), \esc_attr( $this->email_subject ) );
306-
?>
302+
<?php
303+
printf(
304+
/* translators: %s is the email subject. */
305+
\esc_attr__( 'We just tried to send the email "%s" to [EMAIL_ADDRESS], but unfortunately it didn’t work.', 'progress-planner' ),
306+
\esc_attr( $this->email_subject )
307+
);
308+
?>
307309
"></p>
308310

309311
</div>
@@ -314,22 +316,22 @@ public function the_popover_content() {
314316
<?php \progress_planner()->the_asset( 'images/icon_exclamation_circle_solid.svg' ); ?>
315317
</span>
316318
<span class="prpl-note-text" data-email-message="
317-
<?php
318-
/* translators: %s is the error message. */
319-
printf( \esc_attr__( 'The test email didn’t work. The error message was: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_error ) );
320-
?>
319+
<?php
320+
/* translators: %s is the error message. */
321+
printf( \esc_attr__( 'The test email didn’t work. The error message was: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_error ) );
322+
?>
321323
">
322324
</span>
323325
</div>
324326

325327
<p>
326-
<?php
328+
<?php
327329
printf(
328330
/* translators: %s is a link to the troubleshooting guide. */
329331
\esc_html__( 'There are a few common reasons why your email might not be sending. Check the %s to find out what’s causing the issue and how to fix it.', 'progress-planner' ),
330332
'<a href="' . \esc_url( $this->troubleshooting_guide_url ) . '" target="_blank">' . \esc_html__( 'troubleshooting guide', 'progress-planner' ) . '</a>'
331333
);
332-
?>
334+
?>
333335
</p>
334336

335337
<div class="prpl-steps-nav-wrapper">
@@ -349,10 +351,10 @@ public function the_popover_content() {
349351
<div class="prpl-column prpl-column-content">
350352
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'We sent a test email', 'progress-planner' ); ?></h2>
351353
<p class="prpl-interactive-task-description" id="prpl-sending-email-sent-message" data-email-message="
352-
<?php
354+
<?php
353355
/* translators: %s is the email subject. */
354356
printf( \esc_attr__( 'We just sent the email "%s" to [EMAIL_ADDRESS].', 'progress-planner' ), \esc_attr( $this->email_subject ) );
355-
?>
357+
?>
356358
"></p>
357359

358360
</div>
@@ -371,10 +373,10 @@ public function the_popover_content() {
371373
<div class="prpl-radio-wrapper">
372374
<label for="prpl-sending-email-result-yes" class="prpl-custom-radio">
373375
<input
374-
type="radio"
375-
id="prpl-sending-email-result-yes"
376-
name="prpl-sending-email-result"
377-
data-action="showSuccess"
376+
type="radio"
377+
id="prpl-sending-email-result-yes"
378+
name="prpl-sending-email-result"
379+
data-action="showSuccess"
378380
>
379381
<span class="prpl-custom-control"></span>
380382
<?php \esc_html_e( 'Yes', 'progress-planner' ); ?>
@@ -383,10 +385,10 @@ public function the_popover_content() {
383385
<div class="prpl-radio-wrapper">
384386
<label for="prpl-sending-email-result-no" class="prpl-custom-radio">
385387
<input
386-
type="radio"
387-
id="prpl-sending-email-result-no"
388-
name="prpl-sending-email-result"
389-
data-action="showTroubleshooting"
388+
type="radio"
389+
id="prpl-sending-email-result-no"
390+
name="prpl-sending-email-result"
391+
data-action="showTroubleshooting"
390392
>
391393
<span class="prpl-custom-control"></span>
392394
<?php \esc_html_e( 'No', 'progress-planner' ); ?>
@@ -396,10 +398,10 @@ public function the_popover_content() {
396398

397399
<div class="prpl-steps-nav-wrapper">
398400
<button class="prpl-button" data-action="">
399-
<?php
401+
<?php
400402
/* translators: %s is an arrow icon. */
401403
printf( \esc_html__( 'Next step %s', 'progress-planner' ), '<span class="dashicons dashicons-arrow-right-alt2"></span>' );
402-
?>
404+
?>
403405
</button>
404406
</div>
405407
</div>
@@ -426,40 +428,19 @@ public function the_popover_content() {
426428
<div class="prpl-column prpl-column-content">
427429
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'Your email might not be working well', 'progress-planner' ); ?></h2>
428430
<p class="prpl-interactive-task-description">
429-
<?php
430-
\esc_html_e( 'We\'re sorry to hear you did not receive our confirmation email yet. On some websites, it make take up to a few hours to send email. That\'s why we strongly advise you to check back in a few hours from now.', 'progress-planner' );
431-
?>
431+
<?php \esc_html_e( 'We\'re sorry to hear you did not receive our confirmation email yet. On some websites, it make take up to a few hours to send email. That\'s why we strongly advise you to check back in a few hours from now.', 'progress-planner' ); ?>
432432
</p>
433-
<p class="prpl-interactive-task-description">
434-
<?php
435-
\esc_html_e( 'If you already waited a couple of hours and you still didn\'t get our email, your email might not be working well.', 'progress-planner' );
436-
?>
433+
<p class="prpl-interactive-task-description"><?php \esc_html_e( 'If you already waited a couple of hours and you still didn\'t get our email, your email might not be working well.', 'progress-planner' ); ?>
437434
</p>
438435
</div>
439436

440437
<div class="prpl-column">
441438
<?php if ( $this->is_there_sending_email_override() ) : ?>
442-
<p>
443-
<?php
444-
\esc_html_e( 'What can you do next? Well, it looks like you are already running an SMTP plugin on your website, but it might not be configured correctly.', 'progress-planner' );
445-
?>
446-
</p>
447-
<p>
448-
<?php
449-
\esc_html_e( 'You can find more information about running an SMTP plugin in our troubleshooting guide.', 'progress-planner' );
450-
?>
451-
</p>
439+
<p><?php \esc_html_e( 'What can you do next? Well, it looks like you are already running an SMTP plugin on your website, but it might not be configured correctly.', 'progress-planner' ); ?></p>
440+
<p><?php \esc_html_e( 'You can find more information about running an SMTP plugin in our troubleshooting guide.', 'progress-planner' ); ?></p>
452441
<?php else : ?>
453-
<p>
454-
<?php
455-
\esc_html_e( 'What can you do next? If you haven\'t already, you may need to install a plugin to handle email for you (an SMTP plugin).', 'progress-planner' );
456-
?>
457-
</p>
458-
<p>
459-
<?php
460-
\esc_html_e( 'You can find more information about installing an SMTP plugin in our troubleshooting guide.', 'progress-planner' );
461-
?>
462-
</p>
442+
<p><?php \esc_html_e( 'What can you do next? If you haven\'t already, you may need to install a plugin to handle email for you (an SMTP plugin).', 'progress-planner' ); ?></p>
443+
<p><?php \esc_html_e( 'You can find more information about installing an SMTP plugin in our troubleshooting guide.', 'progress-planner' ); ?></p>
463444
<?php endif; ?>
464445

465446
<div class="prpl-steps-nav-wrapper">

0 commit comments

Comments
 (0)