WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#17411 closed defect (bug) (fixed)

Duplicate 'login_form' action in wp-login.php

Reported by: sorich87 Owned by: sorich87
Milestone: 3.2 Priority: normal
Severity: major Version: 3.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

There are two instances of do_action( 'login_form' ); in wp-login.php. This breaks existing plugins which add text or fields to the login form.

The following code can be used to reproduce the bug:

function my_login_form(){
    echo '<p>I am adding something to the login form.</p>';
}
add_action( 'login_form', 'my_login_form' );

The bug was introduced by [17826].

I would suggest renaming the hook added in [17826] to 'login_init' or 'login_header'.

Attachments (2)

17411_login_header_action.diff (497 bytes) - added by sorich87 3 years ago.
Rename login_form action introduced in [17826] to login_header
17411_login_init_action.diff (495 bytes) - added by sorich87 3 years ago.
Rename login_form action introduced in [17826] to login_init

Download all attachments as: .zip

Change History (5)

sorich873 years ago

Rename login_form action introduced in [17826] to login_header

sorich873 years ago

Rename login_form action introduced in [17826] to login_init

comment:1 ryan3 years ago

  • Milestone changed from Awaiting Review to 3.2

comment:2 ryan3 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [17918]:

s/login_form/login_init/. Props sorich87. fixes #17411

comment:3 Anton Torvald2 years ago

.

Last edited 2 years ago by duck_ (previous) (diff)
Note: See TracTickets for help on using tickets.