@@ -99,9 +99,9 @@ public function renderSettingsPage(): void
9999 <th scope="row"><label for="ssg-email-mode"><?php echo esc_html__ ('Email safety mode ' , 'safe-staging-guard ' ); ?> </label></th>
100100 <td>
101101 <select id="ssg-email-mode" name="<?php echo esc_attr (self ::OPTION_NAME ); ?> [email_mode]">
102- <?php foreach ([ ' block ' => ' Block outgoing mail ' , 'redirect ' => ' Redirect outgoing mail ' , 'allow ' => ' Allow outgoing mail ' ] as $ value => $ label ) : ? >
103- <option value="<?php echo esc_attr ( $ value ); ?> " <?php selected ($ settings ->emailMode (), $ value ); ?> ><?php echo esc_html__ ($ label , 'safe-staging-guard ' ); ?> </option>
104- <?php endforeach ; ?>
102+ <option value="block" < ?php selected ( $ settings -> emailMode () , 'block ' ); ?> > <?php echo esc_html__ ( ' Block outgoing mail ' , 'safe-staging-guard ' ); ?> </option >
103+ <option value="redirect " <?php selected ($ settings ->emailMode (), ' redirect ' ); ?> ><?php echo esc_html__ (' Redirect outgoing mail ' , 'safe-staging-guard ' ); ?> </option>
104+ <option value="allow" < ?php selected ( $ settings -> emailMode (), ' allow ' ) ; ?> > <?php echo esc_html__ ( ' Allow outgoing mail ' , ' safe-staging-guard ' ); ?> </option >
105105 </select>
106106 <p class="description"><?php echo esc_html__ ('Email interception is skipped automatically when environment is Production. ' , 'safe-staging-guard ' ); ?> </p>
107107 </td>
@@ -141,7 +141,8 @@ public function renderFrontendBanner(): void
141141 return ;
142142 }
143143 echo '<div style="position:fixed;left:0;right:0;bottom:0;z-index:99999;background:#7c2d12;color:#fff;text-align:center;padding:8px 12px;font:600 13px system-ui,sans-serif;"> ' ;
144- echo esc_html (sprintf (__ ('Safe Staging Guard: %s environment — emails are %s. ' , 'safe-staging-guard ' ), strtoupper ($ settings ->environment ()), $ settings ->emailMode ()));
144+ /* translators: 1: Current environment label, 2: Email safety mode. */
145+ echo esc_html (sprintf (__ ('Safe Staging Guard: %1$s environment — emails are %2$s. ' , 'safe-staging-guard ' ), strtoupper ($ settings ->environment ()), $ settings ->emailMode ()));
145146 echo '</div> ' ;
146147 }
147148
0 commit comments