Changeset 14132
- Timestamp:
- 09/23/2025 07:58:33 PM (3 months ago)
- File:
-
- 1 edited
-
branches/11.0/src/bp-core/bp-core-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/11.0/src/bp-core/bp-core-functions.php
r14117 r14132 4417 4417 // Unsubscribe. 4418 4418 $meta_key = $emails[ $raw_email_type ]['unsubscribe']['meta_key']; 4419 bp_update_user_meta( $raw_user_id, $meta_key, 'no' ); 4419 4420 if ( 'no' !== bp_get_user_meta( $raw_user_id, $meta_key, true ) ) { 4421 bp_update_user_meta( $raw_user_id, $meta_key, 'no' ); 4422 } 4420 4423 4421 4424 $result_msg = $emails[ $raw_email_type ]['unsubscribe']['message']; 4422 $unsub_msg = __( 'You can change this or any other email notification preferences in your email settings.', 'buddypress' ); 4425 4426 if ( bp_is_active( 'settings' ) ) { 4427 $unsub_msg = __( 'You can change this or any other email notification preferences in your email settings.', 'buddypress' ); 4428 } else { 4429 $unsub_msg = ''; 4430 } 4423 4431 } 4424 4432 … … 4432 4440 4433 4441 // Template notices are only displayed on BP pages. 4434 bp_core_add_message( $message ); 4435 bp_core_redirect( bp_core_get_user_domain( $raw_user_id ) ); 4442 if ( is_user_logged_in() ) { 4443 bp_core_add_message( $message ); 4444 bp_core_redirect( bp_members_get_user_url( $raw_user_id ) ); 4445 } else { 4446 wp_die( 4447 sprintf( '%1$s <a href="%2$s">%3$s</a>', esc_html( $result_msg ), esc_url( $redirect_to ), esc_html( $unsub_msg ) ), 4448 esc_html( $unsub_msg ), 4449 array( 4450 'link_url' => esc_url( home_url() ), 4451 'link_text' => esc_html__( 'Go to website\'s home page.', 'buddypress' ), 4452 ) 4453 ); 4454 } 4436 4455 4437 4456 exit;
Note: See TracChangeset
for help on using the changeset viewer.