bp_remove_wc_lostpassword_url( string $default_url = '' )

Returns the url to the lost password.

Description

Parameters

$default_url

(Optional) Default lost password URL.

Default value: ''

Return

(string)

Source

File: bp-core/bp-core-catchuri.php

1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
function bp_remove_wc_lostpassword_url( $default_url = '' ) {
 
    if ( !is_user_logged_in() ) {
 
        $enable_private_network = bp_get_option( 'bp-enable-private-network' );
 
        if ( '0' === $enable_private_network ) {
 
            $args = array( 'action' => 'lostpassword' );
            if ( ! empty( $redirect ) ) {
                $args['redirect_to'] = urlencode( $redirect );
            }
 
            $default_url = add_query_arg( $args, network_site_url( 'wp-login.php', 'login' ) );
        }
    }
 
    return $default_url;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.