[wp-trac] [WordPress Trac] #65254: wp_signup_url() function proposal

WordPress Trac noreply at wordpress.org
Sat May 16 15:32:43 UTC 2026


#65254: wp_signup_url() function proposal
--------------------------------+-----------------------------
 Reporter:  virgodesign         |      Owner:  (none)
     Type:  enhancement         |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:
 Severity:  normal              |   Keywords:
  Focuses:  multisite           |
--------------------------------+-----------------------------
 Hello everyone,

 I noticed that WordPress already provides several helper functions to
 retrieve authentication-related URLs, such as:


 {{{
 wp_login_url()
 wp_logout_url()
 wp_registration_url()
 }}}

 However, there does not seem to be an equivalent function for retrieving
 the Multisite signup URL.

 Developers currently need to manually build or retrieve the signup URL,
 typically using {{{network_site_url( 'wp-signup.php' )}}}. This may create
 inconsistency and make registration/signup URL handling less uniform.

 Additionally, WordPress already relies in multiple places on the following
 filter:

 {{{
 apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' )
 );
 }}}

 This seems to indicate that there is already a need for a centralized and
 filterable signup URL mechanism, but currently there is no dedicated
 global helper function encapsulating this behavior.

 I would like to propose adding a new function:

 {{{
 wp_signup_url()
 }}}

 Possible behavior:

 - In Multisite, return the filtered network signup page URL.
 - In non-Multisite installations, it could return
 {{{wp_registration_url()}}}.

 Example implementation idea:

 {{{#!php
 <?php
 function wp_signup_url() {

    if( is_multisite() ) {
        return apply_filters( 'wp_signup_location', network_site_url( 'wp-
 signup.php' ) );
    }

    return wp_registration_url();

 }
 }}}

 Benefits:

 - Improves API consistency.
 - Centralizes signup URL generation logic.
 - Ensures consistent application of the wp_signup_location filter.
 - Simplifies plugin and theme development.
 - Avoids repeated custom implementations across projects.
 - Provides a clearer semantic distinction between registration and
 Multisite signup flows..

 I’d be happy to hear feedback about the preferred behavior for non-
 Multisite installations and whether this could be a useful addition to
 Core.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65254>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list