Add admin email to user select options

This commit is contained in:
abuyoyo 2024-11-07 20:54:35 +02:00
parent 44993ed048
commit 29f9cf7bef

View File

@ -188,7 +188,8 @@ function swpm_plugin_main() {
<th scope=”row”><label for="swpm-recipient-emails">To:</label></th>
<td><input type="email" multiple id="swpm-recipient-emails" name="email_to" value="<?php echo esc_attr( $email_to ?? '' ); ?>" required><div class="note"><?php _e( 'To send to multiple recipients, enter each email address separated by a comma or choose from the user list below.', 'swpm' ); ?></div>
<select id="swpm-user-list">
<option value="">-- <?php _e( 'user list', 'swpm' ); ?> --</option>
<option value="">-- <?php _e( 'Select Email(s)', 'swpm' ); ?> --</option>
<option value="<?php echo get_option('admin_email') ?>">Administration Email &lt;<?php echo get_option('admin_email') ?>&gt;</option>
<?php
$users = get_users( 'orderby=user_email' );
foreach ( $users as $user ) {