WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#30104 closed defect (bug) (invalid)

Login Form Filters not working

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

Description

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 http://codex.wordpress.org/Customizing_the_Login_Form) 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 (http://codex.wordpress.org/Customizing_the_Login_Form)

It could be a bug or I am missing something?

Thanks in advance and excuse my bad english

Change History (2)

#1 @SergeyBiryukov
5 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
4 years ago

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