WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/register url

Description

register_url is a filter applied to the URL returned by the function wp_registration_url(), which allows you to have that function direct users to a specific (different) URL for registration.

Parameters

$register_url
(string) (required) The URL for registration
Default: None

Examples

The following example would return a registration URL http://mydomain.com/register/ for the wp_registration_url() function:

add_filter( 'register_url', 'my_register_page' );
function my_register_page( $register_url ) {
    return home_url( '/register/' );
}

Notes

The URL that is passed to this filter is generated by site_url using the 'login' $scheme:

site_url( 'wp-login.php?action=register', 'login' )

Change Log

Since: Version 3.6

Source File

register_url is located in wp-includes/general-template.php

Related