It seemed really confusing to me as well. I am used to seeing an alert message like this one only after pressing Submit — I thought perhaps the Register page was submitted without me entering anything. So, for my install I moved the message below the Submit button by editing the wdbj_tml_get_register_form()
function on line 231 of template-functions.php in the plugin’s includes folder:
I commented out $message so it would be empty when wdbj_tml_get_header($message)
executed, and then added the message back in after the Submit button. Or, you could just leave the message off entirely.
function wdbj_tml_get_register_form() {
$current_instance = wdbj_tml_get_var('current_instance');
$user_login = isset($_POST['user_login']) ? $_POST['user_login'] : '';
$user_email = isset($_POST['user_email']) ? $_POST['user_email'] : '';
////// I commented out the line below \\\\\\
// $message = apply_filters('register_message', __('A password will be e-mailed to you.', 'theme-my-login'));
wdbj_tml_get_header($message);
?>
<form name="registerform" id="registerform-<?php echo $current_instance['instance_id']; ?>" action="<?php echo esc_url(wdbj_tml_get_current_url('action=register&instance=' . $current_instance['instance_id'])); ?>" method="post">
<p>
<label for="user_login-<?php echo $current_instance['instance_id']; ?>"><?php _e('Username', 'theme-my-login') ?></label>
<input type="text" name="user_login" id="user_login-<?php echo $current_instance['instance_id']; ?>" class="input" value="<?php echo attribute_escape(stripslashes($user_login)); ?>" size="20" />
</p>
<p>
<label for="user_email-<?php echo $current_instance['instance_id']; ?>"><?php _e('E-mail', 'theme-my-login') ?></label>
<input type="text" name="user_email" id="user_email-<?php echo $current_instance['instance_id']; ?>" class="input" value="<?php echo attribute_escape(stripslashes($user_email)); ?>" size="20" />
</p>
<?php do_action('register_form', $current_instance['instance_id']); ?>
<p class="submit">
<input type="submit" name="wp-submit" id="wp-submit-<?php echo $current_instance['instance_id']; ?>" value="<?php _e('Register', 'theme-my-login'); ?>" />
</p>
//// I added the line below \\\
<p class="message">A password will be e-mailed to you.</p>
</form>
<?php
wdbj_tml_get_footer(true, false, true);
}