Skip to:
Content

BuddyPress.org

Changeset 9705


Ignore:
Timestamp:
04/06/2015 08:55:51 PM (10 years ago)
Author:
boonebgorges
Message:

Filter return value of wp_registration_url() so that it returns BP's Register page.

Props Mamaduka, johnjamesjacoby.
Fixes #6208.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-filters.php

    r9351 r9705  
    1818add_filter( 'bp_displayed_user_fullname',    'esc_html' );
    1919add_filter( 'bp_get_loggedin_user_fullname', 'esc_html' );
     20
     21// Filter the user registration URL to point to BuddyPress's registration page.
     22add_filter( 'register_url', 'bp_get_signup_page' );
    2023
    2124/**
  • trunk/tests/phpunit/testcases/members/functions.php

    r9561 r9705  
    577577        return $value;
    578578    }
     579
     580    /**
     581     * @ticket BP6208
     582     *
     583     * Note - it's not possible to test this when registration is not configured properly,
     584     * because `bp_has_custom_signup_page()` stores its value in a static variable that cannot
     585     * be toggled.
     586     */
     587    public function test_wp_registration_url_should_return_bp_register_page_when_register_page_is_configured_properly() {
     588        $this->assertSame( bp_get_signup_page(), wp_registration_url() );
     589    }
    579590}
Note: See TracChangeset for help on using the changeset viewer.