WordPress.org

Ready to get started?Download WordPress

Codex

Plugin API/Filter Reference/register url

Contents

Description

register_url is a filter applied to the URL returned by the function wp_registration_url(), allowing 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:

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

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 Files

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

Related