Changeset 13170 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 12/10/2021 04:15:05 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-members/bp-members-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
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 );
Note: See TracChangeset
for help on using the changeset viewer.