Make WordPress Core

Opened 23 months ago

Last modified 8 months ago

#56224 new enhancement

Hardcoded wp-login.php vs login_url filter?

Reported by: malthert's profile malthert Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Login and Registration Keywords: needs-patch
Focuses: Cc:


The login_url filter allows changing allows changing the login URL.
However there are a few places, where wp-login.php is hardcoded.

Is the filter safe to use to modify the login url? Should (can?) those hardcoded wp-login.php in core be changed?

Change History (8)

#1 @sabernhardt
23 months ago

Related tickets:

#2 @rajinsharwar
10 months ago

#31830 was marked as a duplicate.

#3 @rajinsharwar
10 months ago

  • Focuses coding-standards added
  • Keywords needs-dev-note added
  • Milestone changed from Awaiting Review to 6.4
  • Type changed from defect (bug) to enhancement

Putting this for 6.4, and marking it as an enhancement.

#4 @oglekler
9 months ago

  • Keywords needs-patch added

This needs patch and I am also wondering if this can be marked as good-first-bug or not.

#5 @faisal03
9 months ago

Should all instances of site_url() with wp-login.php be changed?

for example:

<form class="admin-email-confirm-form" name="admin-email-confirm-form" action="<?php echo esc_url( site_url( 'wp-login.php?action=confirm_admin_email', 'login_post' ) ); ?>" method="post">

to something like?:

<form class="admin-email-confirm-form" name="admin-email-confirm-form" action="<?php echo esc_url( wp_login_url() . '?action=confirm_admin_email' ); ?>" method="post">

#6 @oglekler
9 months ago

There is also network_site_url().
I wonder if we need a new function that will return the path according to the action passed in, with the ability to filter that path so we can easily change it to something nice (without the action get parameter) - something to think about.

#7 @oglekler
8 months ago

  • Milestone changed from 6.4 to 6.5

There is no patch and no time before Beta 1 to finish and test it, so, I am moving this ticket into the 6.5 milestone.

#8 @sabernhardt
8 months ago

  • Focuses coding-standards removed
  • Keywords needs-dev-note removed
  • Milestone changed from 6.5 to Future Release

#35177 proposed a new wp_login_handler_url function that considers both network_site_url and site_url. The patch there would need updating.

I think this should be an "umbrella" task ticket, to keep track of related changes on tickets such as #31830 and #35177.

Note: See TracTickets for help on using tickets.