Make WordPress Core

Opened 10 years ago

Closed 8 years ago

#30104 closed defect (bug) (invalid)

Login Form Filters not working

Reported by: davidp98's profile davidp98 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Login and Registration Keywords:
Focuses: Cc:


Hi, after searching and get it into several parts, I think it is possibly a bug.

Hi, I'm trying to use a filter (documented here on the login page of my wordpress based web, but it does not work, I'm trying to insert a text immediately after opening the form tag:

add_filter( 'login_form_top', 'message_top' );function message_top(){return 'This is what I want it to say!';}

I add the code in functions.php and nothing happens.
But the strange thing of that is if I change the filter, e.g:

add_filter( 'login_message', 'message_top' );function message_top(){return 'This is what I want it to say!';} 

It works (outside the form tag). Looking the code of wp-login.php (WP 4.0) I can see the call to this filter (login_form_top) is never made although it is documented (

It could be a bug or I am missing something?

Thanks in advance and excuse my bad english

Change History (2)

#1 @SergeyBiryukov
10 years ago

That action is specific to wp_login_form() function, which can be used for custom login forms.

For the default form, use login_form or any other appropriate action in wp-login.php.

#2 @chriscct7
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.