| 2 | | |
| 3 | | |
| 4 | | This is correct? |
| 5 | | |
| 6 | | //////////////////////////////////////////////////////////////////// |
| 7 | | Code activate.php modified with the patch 7894.2.patch |
| 8 | | //////////////////////////////////////////////////////////////////// |
| 9 | | |
| 10 | | |
| 11 | | |
| 12 | | |
| 13 | | {{{ |
| 14 | | <?php |
| 15 | | /** |
| 16 | | * BuddyPress - Members Activate |
| 17 | | * |
| 18 | | * @since 3.0.0 |
| 19 | | * @version 3.1.0 |
| 20 | | */ |
| 21 | | ?> |
| 22 | | |
| 23 | | <?php bp_nouveau_activation_hook( 'before', 'page' ); ?> |
| 24 | | |
| 25 | | <div class="page" id="activate-page"> |
| 26 | | |
| 27 | | <?php bp_nouveau_template_notices(); ?> |
| 28 | | |
| 29 | | <?php bp_nouveau_activation_hook( 'before', 'content' ); ?> |
| 30 | | |
| 31 | | <?php if ( bp_account_was_activated() ) : ?> |
| 32 | | |
| 33 | | <?php if ( isset( $_GET['e'] ) ) : ?> |
| 34 | | <p><?php esc_html_e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p> |
| 35 | | <?php else : ?> |
| 36 | | <p> |
| 37 | | <?php |
| 38 | | - echo esc_html( |
| 39 | | - sprintf( |
| 40 | | - __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), |
| 41 | | - wp_login_url( bp_get_root_domain() ) |
| 42 | | - ) |
| 43 | | + echo sprintf( |
| 44 | | + /* Translators: %s is used to output the Login link */ |
| 45 | | + esc_html__( 'Your account was activated successfully! You can now %s with the username and password you provided when you signed up.', 'buddypress' ), |
| 46 | | + '<a href="' . wp_login_url( bp_get_root_domain() ) . '"> ' . esc_html_x( 'log in', 'Activated signup confirmation message', 'buddypress' ) . '</a>' |
| 47 | | ); |
| 48 | | ?> |
| 49 | | </p> |
| 50 | | <?php endif; ?> |
| 51 | | |
| 52 | | <?php else : ?> |
| 53 | | |
| 54 | | <p><?php esc_html_e( 'Please provide a valid activation key.', 'buddypress' ); ?></p> |
| 55 | | |
| 56 | | <form action="" method="post" class="standard-form" id="activation-form"> |
| 57 | | |
| 58 | | <label for="key"><?php esc_html_e( 'Activation Key:', 'buddypress' ); ?></label> |
| 59 | | <input type="text" name="key" id="key" value="<?php echo esc_attr( bp_get_current_activation_key() ); ?>" /> |
| 60 | | |
| 61 | | <p class="submit"> |
| 62 | | <input type="submit" name="submit" value="<?php echo esc_attr_x( 'Activate', 'button', 'buddypress' ); ?>" /> |
| 63 | | </p> |
| 64 | | |
| 65 | | </form> |
| 66 | | |
| 67 | | <?php endif; ?> |
| 68 | | |
| 69 | | <?php bp_nouveau_activation_hook( 'after', 'content' ); ?> |
| 70 | | |
| 71 | | </div><!-- .page --> |
| 72 | | |
| 73 | | <?php bp_nouveau_activation_hook( 'after', 'page' ); ?> |
| 74 | | |
| 75 | | }}} |
| 76 | | |
| 77 | | |
| 78 | | |
| 79 | | |
| 80 | | |
| 81 | | |
| 82 | | |
| 83 | | |
| 84 | | |
| 85 | | |
| 86 | | |
| 87 | | |
| 88 | | //////////////////////////////////////////////////////////////////// |
| 89 | | This is the original code of activate.php |
| 90 | | //////////////////////////////////////////////////////////////////// |
| 91 | | |
| 92 | | {{{ |
| 93 | | <?php |
| 94 | | /** |
| 95 | | * BuddyPress - Members Activate |
| 96 | | * |
| 97 | | * @since 3.0.0 |
| 98 | | * @version 3.1.0 |
| 99 | | */ |
| 100 | | ?> |
| 101 | | |
| 102 | | <?php bp_nouveau_activation_hook( 'before', 'page' ); ?> |
| 103 | | |
| 104 | | <div class="page" id="activate-page"> |
| 105 | | |
| 106 | | <?php bp_nouveau_template_notices(); ?> |
| 107 | | |
| 108 | | <?php bp_nouveau_activation_hook( 'before', 'content' ); ?> |
| 109 | | |
| 110 | | <?php if ( bp_account_was_activated() ) : ?> |
| 111 | | |
| 112 | | <?php if ( isset( $_GET['e'] ) ) : ?> |
| 113 | | <p><?php esc_html_e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p> |
| 114 | | <?php else : ?> |
| 115 | | <p> |
| 116 | | <?php |
| 117 | | echo esc_html( |
| 118 | | sprintf( |
| 119 | | __( 'Your account was activated successfully! You can now <a href="%s">log in</a> with the username and password you provided when you signed up.', 'buddypress' ), |
| 120 | | wp_login_url( bp_get_root_domain() ) |
| 121 | | ) |
| 122 | | ); |
| 123 | | ?> |
| 124 | | </p> |
| 125 | | <?php endif; ?> |
| 126 | | |
| 127 | | <?php else : ?> |
| 128 | | |
| 129 | | <p><?php esc_html_e( 'Please provide a valid activation key.', 'buddypress' ); ?></p> |
| 130 | | |
| 131 | | <form action="" method="post" class="standard-form" id="activation-form"> |
| 132 | | |
| 133 | | <label for="key"><?php esc_html_e( 'Activation Key:', 'buddypress' ); ?></label> |
| 134 | | <input type="text" name="key" id="key" value="<?php echo esc_attr( bp_get_current_activation_key() ); ?>" /> |
| 135 | | |
| 136 | | <p class="submit"> |
| 137 | | <input type="submit" name="submit" value="<?php echo esc_attr_x( 'Activate', 'button', 'buddypress' ); ?>" /> |
| 138 | | </p> |
| 139 | | |
| 140 | | </form> |
| 141 | | |
| 142 | | <?php endif; ?> |
| 143 | | |
| 144 | | <?php bp_nouveau_activation_hook( 'after', 'content' ); ?> |
| 145 | | |
| 146 | | </div><!-- .page --> |
| 147 | | |
| 148 | | <?php bp_nouveau_activation_hook( 'after', 'page' ); ?> |
| 149 | | |
| 150 | | }}} |
| 151 | | |