Changeset 13170
- Timestamp:
- 12/10/2021 04:15:05 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-template.php
r13140 r13170 3193 3193 // Sign up page. 3194 3194 } elseif ( bp_is_register_page() ) { 3195 $bp_title_parts = array( __( 'Create an Account', 'buddypress' ) ); 3195 if ( bp_get_membership_requests_required() ) { 3196 $bp_title_parts = array( __( 'Request Membership', 'buddypress' ) ); 3197 } else { 3198 $bp_title_parts = array( __( 'Create an Account', 'buddypress' ) ); 3199 } 3196 3200 3197 3201 // Activation page. -
trunk/src/bp-members/bp-members-functions.php
r13165 r13170 2445 2445 2446 2446 // Unactivated user account found! 2447 // Set up the feedback message. 2448 $signup_id = $signup['signups'][0]->signup_id; 2449 2450 $resend_url_params = array( 2451 'action' => 'bp-resend-activation', 2452 'id' => $signup_id, 2453 ); 2454 2455 $resend_url = wp_nonce_url( 2456 add_query_arg( $resend_url_params, wp_login_url() ), 2457 'bp-resend-activation' 2458 ); 2459 2460 $resend_string = '<br /><br />'; 2461 2462 /* translators: %s: the activation url */ 2463 $resend_string .= sprintf( __( 'If you have not received an email yet, <a href="%s">click here to resend it</a>.', 'buddypress' ), esc_url( $resend_url ) ); 2464 2465 return new WP_Error( 'bp_account_not_activated', __( '<strong>Error</strong>: Your account has not been activated. Check your email for the activation link.', 'buddypress' ) . $resend_string ); 2447 /* 2448 * Don't allow users to resend their own activation email 2449 * when membership requests are enabled. 2450 */ 2451 if ( bp_get_membership_requests_required() ) { 2452 $error_message = sprintf( 2453 '<strong>%1$s</strong> %2$s', 2454 esc_html_x( 'Error:', 'Warning displayed on the WP Login screen', 'buddypress' ), 2455 esc_html_x( 'Your membership request has not yet been approved.', 'Error message displayed on the WP Login screen', 'buddypress' ) 2456 ); 2457 } else { 2458 // Set up the feedback message. 2459 $signup_id = $signup['signups'][0]->signup_id; 2460 2461 $resend_url_params = array( 2462 'action' => 'bp-resend-activation', 2463 'id' => $signup_id, 2464 ); 2465 2466 $resend_url = wp_nonce_url( 2467 add_query_arg( $resend_url_params, wp_login_url() ), 2468 'bp-resend-activation' 2469 ); 2470 2471 $error_message = sprintf( 2472 '<strong>%1$s</strong> %2$s<br /><br />%3$s', 2473 esc_html_x( 'Error:', 'Warning displayed on the WP Login screen', 'buddypress' ), 2474 esc_html_x( 'Your account has not been activated. Check your email for the activation link.', 'Error message displayed on the WP Login screen', 'buddypress' ), 2475 sprintf( 2476 /* translators: %s: the link to resend the activation email. */ 2477 esc_html_x( 'If you have not received an email yet, %s.', 'WP Login screen message', 'buddypress' ), 2478 sprintf( 2479 '<a href="%1$s">%2$s</a>', 2480 esc_url( $resend_url ), 2481 esc_html_x( 'click here to resend it', 'Text of the link to resend the activation email', 'buddypress' ) 2482 ) 2483 ) 2484 ); 2485 } 2486 2487 return new WP_Error( 'bp_account_not_activated', $error_message ); 2466 2488 } 2467 2489 add_filter( 'authenticate', 'bp_core_signup_disable_inactive', 30, 3 ); -
trunk/src/bp-members/bp-members-membership-requests.php
r13169 r13170 260 260 261 261 /** 262 * In the Nouveau template pack, when membership requests are required, 263 * change registration form submit button label to "Submit Request". 264 * 265 * @since 10.0.0 266 * 267 * @return string $retval the HTML for the request membership link. 268 */ 269 function bp_members_membership_requests_filter_complete_signup_button( $buttons ) { 270 271 $buttons['register']['attributes']['value'] = __( 'Submit Request', 'buddypress' ); 272 return $buttons; 273 } 274 add_filter( 'bp_nouveau_get_submit_button', 'bp_members_membership_requests_filter_complete_signup_button' ); 275 276 /** 262 277 * Administration: Change certain behavior and labels 263 278 * on the WP Admin > Users > Manage Signups screen. -
trunk/src/bp-members/classes/class-bp-registration-theme-compat.php
r10521 r13170 98 98 // Registration page. 99 99 if ( bp_is_register_page() ) { 100 $title = __( 'Create an Account', 'buddypress' ); 100 if ( bp_get_membership_requests_required() ) { 101 $title = __( 'Request Membership', 'buddypress' ); 102 } else { 103 $title = __( 'Create an Account', 'buddypress' ); 104 } 101 105 102 106 if ( 'completed-confirmation' == bp_get_current_signup_step() ) { 103 $title = __( 'Check Your Email To Activate Your Account!', 'buddypress' ); 107 if ( bp_get_membership_requests_required() ) { 108 $title = __( 'Your Membership Request has been submitted.', 'buddypress' ); 109 } else { 110 $title = __( 'Check Your Email To Activate Your Account!', 'buddypress' ); 111 } 104 112 } 105 113 -
trunk/src/bp-members/screens/register.php
r12920 r13170 62 62 } 63 63 64 if ( ! bp_get_signup_allowed() && ! $active_invite ) { 64 $requests_enabled = bp_get_membership_requests_required(); 65 66 if ( ! bp_get_signup_allowed() && ! $active_invite && ! $requests_enabled ) { 65 67 $bp->signup->step = 'registration-disabled'; 66 68 // If the signup page is submitted, validate and save. … … 198 200 $active_signup = bp_core_get_root_option( 'registration' ); 199 201 200 if ( 'none' != $active_signup ) {202 if ( 'none' != $active_signup || $requests_enabled ) { 201 203 202 204 // Make sure the extended profiles module is enabled. -
trunk/src/bp-templates/bp-legacy/buddypress/members/register.php
r12887 r13170 352 352 * @since 1.1.0 353 353 */ 354 do_action( 'bp_before_registration_submit_buttons' ); ?> 354 do_action( 'bp_before_registration_submit_buttons' ); 355 356 if ( bp_get_membership_requests_required() ) { 357 $button_text = __( 'Submit Request', 'buddypress' ); 358 } else { 359 $button_text = __( 'Complete Sign Up', 'buddypress' ); 360 } 361 ?> 355 362 356 363 <div class="submit"> 357 <input type="submit" name="signup_submit" id="signup_submit" value="<?php e sc_attr_e( 'Complete Sign Up', 'buddypress'); ?>" />364 <input type="submit" name="signup_submit" id="signup_submit" value="<?php echo esc_attr( $button_text ); ?>" /> 358 365 </div> 359 366 … … 391 398 392 399 <div id="template-notices" role="alert" aria-atomic="true"> 393 <?php if ( bp_registration_needs_activation() ) : ?> 400 <?php if ( bp_get_membership_requests_required() ) : ?> 401 <p><?php _e( 'You have successfully submitted your membership request! Our site moderators will review your submission and send you an activation email if your request is approved.', 'buddypress' ); ?></p> 402 <?php elseif ( bp_registration_needs_activation() ) : ?> 394 403 <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); ?></p> 395 404 <?php else : ?> -
trunk/src/bp-templates/bp-nouveau/includes/functions.php
r13145 r13170 1123 1123 * Adjust some messages to the context. 1124 1124 */ 1125 if ( 'completed-confirmation' === $feedback_id && bp_registration_needs_activation() ) { 1125 if ( 'completed-confirmation' === $feedback_id && bp_get_membership_requests_required() ) { 1126 $feedback_messages['completed-confirmation']['message'] = __( 'You have successfully submitted your membership request! Our site moderators will review your submission and send you an activation email if your request is approved.', 'buddypress' ); 1127 } elseif ( 'completed-confirmation' === $feedback_id && bp_registration_needs_activation() ) { 1126 1128 $feedback_messages['completed-confirmation']['message'] = __( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); 1127 1129 } elseif ( 'member-notifications-none' === $feedback_id ) {
Note: See TracChangeset
for help on using the changeset viewer.