Notices - below-h2

This commit is contained in:
abuyoyo 2024-11-10 07:18:14 +02:00
parent 059f67fd0c
commit 219fdb8b29

View File

@ -120,16 +120,16 @@ function swpm_plugin_main() {
if ( $group_email === 'yes' ) { if ( $group_email === 'yes' ) {
if ( wp_mail( $email_to, $email_subject, $email_body, $headers, $attachments ) ) { if ( wp_mail( $email_to, $email_subject, $email_body, $headers, $attachments ) ) {
$send_mail_message = '<div class="updated">' . __( 'Your email has been successfully sent!', 'swpm' ) . '</div>'; $send_mail_message = '<div class="below-h2 updated">' . __( 'Your email has been successfully sent!', 'swpm' ) . '</div>';
} else { } else {
$send_mail_message = '<div class="error">' . __( 'There was an error sending the email.', 'swpm' ) . '</div>'; $send_mail_message = '<div class="below-h2 error">' . __( 'There was an error sending the email.', 'swpm' ) . '</div>';
} }
} else { } else {
foreach( $recipients as $recipient ) { foreach( $recipients as $recipient ) {
if ( wp_mail( $recipient, $email_subject, $email_body, $headers, $attachments ) ) { if ( wp_mail( $recipient, $email_subject, $email_body, $headers, $attachments ) ) {
$send_mail_message .= '<div class="updated">' . __( 'Your email has been successfully sent to ', 'swpm' ) . esc_html($recipient) . '!</div>'; $send_mail_message .= '<div class="below-h2 updated">' . __( 'Your email has been successfully sent to ', 'swpm' ) . esc_html($recipient) . '!</div>';
} else { } else {
$send_mail_message .= '<div class="error">' . __( 'There was an error sending the email to ', 'swpm' ) . esc_html($recipient) . '</div>'; $send_mail_message .= '<div class="below-h2 error">' . __( 'There was an error sending the email to ', 'swpm' ) . esc_html($recipient) . '</div>';
} }
} }
} }
@ -145,7 +145,7 @@ function swpm_plugin_main() {
<h1><?php _e( 'Send WP Mail', 'swpm' ); ?></h1> <h1><?php _e( 'Send WP Mail', 'swpm' ); ?></h1>
<?php <?php
if ( !empty($errors) ) { if ( !empty($errors) ) {
echo '<div class="error"><ul>'; echo '<div class="below-h2 error"><ul>';
foreach ($errors as $error) { foreach ($errors as $error) {
echo "<li>$error</li>"; echo "<li>$error</li>";
} }