[wp-trac] [WordPress Trac] #31495: Always use 'login' as $scheme parameter for "login-ish" URLs, and other inconsistencies

WordPress Trac noreply at wordpress.org
Sun Mar 1 17:46:11 UTC 2015


#31495: Always use 'login' as $scheme parameter for "login-ish" URLs, and other
inconsistencies
------------------------------------+------------------------------
 Reporter:  GregLone                |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:                          |     Focuses:
------------------------------------+------------------------------

Comment (by GregLone):

 Replying to [comment:1 DrewAPicture]:
 > * **wp-activate.php**: The use of `network_site_url()`. I think that
 needs to be left alone because it's specifically for the multisite/network
 URL use-case. If it isn't multisite, it'll fall back to `site_url()`
 anyway.
 As far as I can tell, `network_site_url()` is used only for "lost
 password" and "reset password". I think `network_site_url('wp-login.php',
 'login')` does not make sense, as it is not used anywhere else in core and
 should be replaced by `esc_url( wp_login_url() )`. At least, I think it
 should be discussed.
 > * **wp-includes/ms-functions.php**: email template string
 > * **wp-includes/schema.php**: email template
 May I suggest something simple? A bit hacky, but retro-compat'.
 {{{
 switch_to_blog( $blog_id );
 $login_url = wp_login_url();
 restore_current_blog();

 $welcome_email = str_replace( 'BLOG_URLwp-login.php', $login_url,
 $welcome_email );
 }}}

 > Some of those have been in core since we switched from using direct file
 links more than four years ago.
 Yes, sorry for the "Version 4.1.1" x)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31495#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list