Skip to content

Commit

Permalink
Add code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nirajgiriXD committed Nov 5, 2024
1 parent 3f98a78 commit 750d0f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wp-includes/general-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ function wp_login_url( $redirect = '', $force_reauth = false ) {
* @return string User registration URL.
*/
function wp_registration_url( $redirect = '' ) {
// Set base registration URL.
$register_url = site_url( 'wp-login.php?action=register', 'login' );

// Append redirect URL if provided.
if ( ! empty( $redirect ) ) {
$register_url = add_query_arg( 'redirect_to', urlencode( $redirect ), $register_url );
}
Expand Down

0 comments on commit 750d0f0

Please sign in to comment.