[wp-trac] [WordPress Trac] #44353: Replace `site_url( 'wp-login.php' )` in `wp_send_user_request()`
WordPress Trac
noreply at wordpress.org
Fri Jun 15 13:58:51 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: Awaiting Review
Component: Privacy | Version: 4.9.6
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+------------------------------
Comment (by rwebster85):
Would it not be easier to add a filtered variable in the array instead of
{{{site_url()}}}? That way we could hook into the filter and change it to
a frontend page, for sites like mine that disable access to the default WP
pages and have everything on the frontend.
Something like:
{{{#!php
$site_email = apply_filters( 'some_filter', site_url( 'wp-login.php' ),
'confirmaction' )
$email_data = array(
'email' => $request->email,
'description' => wp_user_request_action_description(
$request->action_name ),
'confirm_url' => add_query_arg( array(
'action' => 'confirmaction',
'request_id' => $request_id,
'confirm_key' => wp_generate_user_request_key( $request_id
),
), $site_email ),
'sitename' => is_multisite() ? get_site_option( 'site_name' ) :
get_option( 'blogname' ),
'siteurl' => network_home_url(),
);
{{{#!php
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44353#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list