wp_registration_url()WP 3.6.0

Returns the URL that allows the user to register on the site.

Used By: wp_register()
1 time — 0.000103 sec (fast) | 50000 times — 2.12 sec (fast)
Hooks from the function

Return

String. User registration URL.

Usage

wp_registration_url();

Examples

0

#1 Get a link to the registration page

$register_url = wp_registration_url();

echo $register_url; // http://example.com/wp-login.php?action=register
0

#2 Sample Registration Link

<a href="<?php echo esc_url( wp_registration_url() ); ?>">
	<?php esc_html_e( 'Register', 'textdomain' ); ?>
</a>

Changelog

Since 3.6.0 Introduced.

wp_registration_url() code WP 6.6.2

function wp_registration_url() {
	/**
	 * Filters the user registration URL.
	 *
	 * @since 3.6.0
	 *
	 * @param string $register The user registration URL.
	 */
	return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) );
}