Skip to:
Content

BuddyPress.org

Ticket #6208: 6208.diff

File 6208.diff, 915 bytes (added by Mamaduka, 5 years ago)
  • src/bp-members/bp-members-filters.php

    diff --git src/bp-members/bp-members-filters.php src/bp-members/bp-members-filters.php
    index 2e15e19..146cc49 100644
    function bp_members_edit_profile_url( $url, $user_id, $scheme = 'admin' ) { 
    123123        return apply_filters( 'bp_members_edit_profile_url', $profile_link, $url, $user_id, $scheme );
    124124}
    125125add_filter( 'edit_profile_url', 'bp_members_edit_profile_url', 10, 3 );
     126
     127/**
     128 * Filter the user registration URL to point to BuddyPress registration page.
     129 *
     130 * @since BuddyPress (2.3.0)
     131 *
     132 * @param string $register The user registration URL.
     133 * @return string $register
     134 */
     135function bp_registration_url( $register ) {
     136        if ( bp_get_signup_allowed() ) {
     137                $register = trailingslashit( home_url( bp_get_signup_slug() ) );
     138        }
     139
     140        return $register;
     141}
     142add_filter( 'register_url', 'bp_registration_url' );