| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /** |
|---|
| 4 | * User Registration Form |
|---|
| 5 | * |
|---|
| 6 | * @package bbPress |
|---|
| 7 | * @subpackage Theme |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | ?> |
|---|
| 11 | |
|---|
| 12 | - <form method="post" action="<?php bbp_wp_login_action( array( 'action' => 'register', 'context' => 'login_post' ) ); ?>" class="bbp-login-form"> |
|---|
| 13 | - <fieldset> |
|---|
| 14 | - <legend><?php _e( 'Register', 'bbpress' ); ?></legend> |
|---|
| 15 | - |
|---|
| 16 | - <?php do_action( 'bbp_template_notices' ); ?> |
|---|
| 17 | - |
|---|
| 18 | - <div class="bbp-username"> |
|---|
| 19 | - <label for="user_login"><?php _e( 'Username', 'bbpress' ); ?>: </label> |
|---|
| 20 | - <input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login' ); ?>" size="20" id="user_login" tabindex="<?php bbp_tab_index(); ?>" /> |
|---|
| 21 | - </div> |
|---|
| 22 | - |
|---|
| 23 | - <div class="bbp-email"> |
|---|
| 24 | - <label for="user_email"><?php _e( 'Email Address', 'bbpress' ); ?>: </label> |
|---|
| 25 | - <input type="text" name="user_email" value="<?php bbp_sanitize_val( 'user_email' ); ?>" size="20" id="user_email" tabindex="<?php bbp_tab_index(); ?>" /> |
|---|
| 26 | - </div> |
|---|
| 27 | - |
|---|
| 28 | - <div class="bbp-submit-wrapper"> |
|---|
| 29 | - |
|---|
| 30 | - <?php do_action( 'register_form' ); ?> |
|---|
| 31 | - |
|---|
| 32 | - <button type="submit" name="user-submit" tabindex="<?php bbp_tab_index(); ?>" class="user-submit"><?php _e( 'Register', 'bbpress' ); ?></button> |
|---|
| 33 | - |
|---|
| 34 | - <?php bbp_user_register_fields(); ?> |
|---|
| 35 | - |
|---|
| 36 | - </div> |
|---|
| 37 | - </fieldset> |
|---|
| 38 | - </form> |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | + <form method="post" action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" class="bbp-login-form"> |
|---|
| 42 | + <fieldset><legend><?php _e( 'Register', 'bbpress' ); ?></legend> |
|---|
| 43 | + <div class="bbp-username"> |
|---|
| 44 | + <label for="user_login"><?php _e('Username'); ?>: </label> |
|---|
| 45 | + <input type="text" name="user_login" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="25" id="user_login" tabindex="101" autofocus required /> |
|---|
| 46 | + </div> |
|---|
| 47 | + <div class="bbp-email"> |
|---|
| 48 | + <label for="user_email"><?php _e('Your Email'); ?>: </label> |
|---|
| 49 | + <input type="email" name="user_email" value="<?php echo esc_attr(stripslashes($user_email)); ?>" size="25" id="user_email" tabindex="102" required /> |
|---|
| 50 | + </div> |
|---|
| 51 | + <div class="bbp-submit-wrapper"> |
|---|
| 52 | + <?php do_action('register_form'); ?> |
|---|
| 53 | + <input type="submit" name="user-submit" value="<?php _e('Register'); ?>" class="user-submit" tabindex="103" /> |
|---|
| 54 | + <?php $register = $_GET['register']; if($register == true) { echo '<p>Check your email for the password!</p>'; } ?> |
|---|
| 55 | + <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>?register=true" /> |
|---|
| 56 | + <input type="hidden" name="user-cookie" value="1" /> |
|---|
| 57 | + </div> |
|---|
| 58 | + </fieldset> |
|---|
| 59 | + </form> |
|---|