[wp-trac] [WordPress Trac] #44353: Replace `site_url( 'wp-login.php' )` in `wp_send_user_request()`

WordPress Trac noreply at wordpress.org
Tue Jun 19 09:46:20 UTC 2018


#44353: Replace `site_url( 'wp-login.php' )` in `wp_send_user_request()`
--------------------------------------------------+---------------------
 Reporter:  7studio                               |       Owner:  (none)
     Type:  defect (bug)                          |      Status:  new
 Priority:  normal                                |   Milestone:  4.9.7
Component:  Privacy                               |     Version:  4.9.6
 Severity:  normal                                |  Resolution:
 Keywords:  good-first-bug has-patch 2nd-opinion  |     Focuses:
--------------------------------------------------+---------------------

Comment (by 7studio):

 @desrosj I can understand your position about `set_url_scheme()` and the
 parameter `$scheme` but I think we should use this parameter like a
 context or a keyword (e.g.: `login`, `login_post`, `admin`, etc) which
 will be used in `apply_filters( 'set_url_scheme', $url, $scheme,
 $orig_scheme )` no more.
 The login URL has not its place in a public email and plugins should do
 the difference between this URL and the login one :/ Plus, the ticket
 opened by @rwebster85 has been closed… It would be so easy to filter this
 URL via the filter hook `set_url_scheme` and not handle it like that:
 {{{#!php
 <?php
 function thistle_override_privacy_confirm_url( $email_text, $email_data )
 {
     $confirm_url_query = parse_url( $email_data['confirm_url'],
 PHP_URL_QUERY );
     $confirm_url = home_url( 'donnees-personnelles/' ) . '?' .
 $confirm_url_query;

     $email_text = str_replace( '###CONFIRM_URL###', esc_url_raw(
 $confirm_url ), $email_text );

     return $email_text;
 }
 add_filter( 'user_request_action_email_content',
 'thistle_override_privacy_confirm_url', 10, 2 );
 }}}
 Thank you very much to all for your proposals and your point of view, it's
 really interesting :)

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


More information about the wp-trac mailing list