Skip to content

Commit 943c093

Browse files
committed
minor syntax tweak
1 parent b0967ac commit 943c093

1 file changed

Lines changed: 23 additions & 33 deletions

File tree

classes/suggested-tasks/providers/class-set-date-format.php

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -112,39 +112,29 @@ public function should_add_task() {
112112
*/
113113
public function print_popover_instructions() {
114114
$detected_date_format = $this->get_date_format_type();
115-
116-
if ( 'wp_default' === $detected_date_format ) {
117-
echo '<p>';
118-
\esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' );
119-
echo '</p>';
120-
echo '<p>';
121-
\esc_html_e( 'By setting the correct format, you make sure dates show up clearly both in your dashboard and on your live site.', 'progress-planner' );
122-
echo '</p>';
123-
echo '<p>';
124-
\esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' );
125-
echo '</p>';
126-
} elseif ( 'localized_default' === $detected_date_format ) {
127-
echo '<p>';
128-
\esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' );
129-
echo '</p>';
130-
echo '<p>';
131-
/* translators: %s: The date format. */
132-
printf( \esc_html__( 'The date format currently set matches the default format for your site language (%s). Therefore, we expect it\'s set correctly. But can you have a quick look, just to be sure?', 'progress-planner' ), \esc_html( \get_option( 'date_format' ) ) );
133-
echo '</p>';
134-
echo '<p>';
135-
\esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' );
136-
echo '</p>';
137-
} else {
138-
echo '<p>';
139-
\esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' );
140-
echo '</p>';
141-
echo '<p>';
142-
\esc_html_e( 'Because your site is not using the WordPress default setting, we expect you may have set this already. That\'s why we just want you to verify if it\'s set correctly.', 'progress-planner' );
143-
echo '</p>';
144-
echo '<p>';
145-
\esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' );
146-
echo '</p>';
147-
}
115+
?>
116+
<?php if ( 'wp_default' === $detected_date_format ) : ?>
117+
<p><?php \esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' ); ?></p>
118+
<p><?php \esc_html_e( 'By setting the correct format, you make sure dates show up clearly both in your dashboard and on your live site.', 'progress-planner' ); ?></p>
119+
<p><?php \esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' ); ?></p>
120+
<?php elseif ( 'localized_default' === $detected_date_format ) : ?>
121+
<p><?php \esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' ); ?></p>
122+
<p>
123+
<?php
124+
printf(
125+
/* translators: %s: The date format. */
126+
\esc_html__( 'The date format currently set matches the default format for your site language (%s). Therefore, we expect it\'s set correctly. But can you have a quick look, just to be sure?', 'progress-planner' ),
127+
\esc_html( \get_option( 'date_format' ) )
128+
);
129+
?>
130+
</p>
131+
<p><?php \esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' ); ?></p>
132+
<?php else : ?>
133+
<p><?php \esc_html_e( 'Choosing the right date format helps your visitors instantly understand when something was published without confusion or guessing. It also makes your site feel more familiar and trustworthy, especially if your audience is local.', 'progress-planner' ); ?></p>
134+
<p><?php \esc_html_e( 'Because your site is not using the WordPress default setting, we expect you may have set this already. That\'s why we just want you to verify if it\'s set correctly.', 'progress-planner' ); ?></p>
135+
<p><?php \esc_html_e( 'Tip: Pick the format that matches what your audience expects.', 'progress-planner' ); ?></p>
136+
<?php endif; ?>
137+
<?php
148138
}
149139

150140
/**

0 commit comments

Comments
 (0)