errors ) ) { /** * Filter here to redirect the User to a different URL than the activation page. * * @since 10.0.0 * * @param string $redirect The URL to use to redirect the user. * @param WP_Error $user The WP Error object. */ $redirect = apply_filters( 'bp_members_action_activate_errored_redirect', $redirect, $user ); bp_core_add_message( $user->get_error_message(), 'error' ); bp_core_redirect( $redirect ); } /** * Filter here to redirect the User to a different URL than the activation page. * * @since 10.0.0 * * @param string $redirect The URL to use to redirect the user. */ $redirect = apply_filters( 'bp_members_action_activate_successed_redirect', $redirect ); bp_core_add_message( __( 'Your account is now active!', 'buddypress' ) ); bp_core_redirect( add_query_arg( 'activated', '1', $redirect ) ); } add_action( 'bp_actions', 'bp_members_action_activate_account' );