Description
This filter hook comes after the html for the login form is compiled. Using this filter, you can make changes to the login form.
Note: the “login” form is used in three ways – Login, Password Change, Forgotten Password Reset. The state is determined by the value of the wp-members action variable $wpmem_a, which is available as global $wpmem_a; For password change, the value will be pwdchange and for forgotten password reset it will be pwdreset.
Parameters
$form
(string) (required) The form HTML as a string.
$action
(string) (optional) The form being generated (login|pwdreset|pwdchange|getusername)
Changelog
Introduced in version 2.7.4
$action argument added in 2.9.1
Source
wpmem_inc_logins is located in forms.php
Usage
add_filter( 'wpmem_login_form', 'my_login_form_filter', 10, 2 ); function my_login_form_filter( $form, $action ) { /** * The login form is brought in with $form * You can append to it or filter it * * $action specifies the form being constructed. It * can be: login|pwdreset|pwdchange */ return $form; }
Code Snippet Library [Subscriber Content]
- Display form rows in columns
- Force user to update password from randomly set password
- Reset password with just email
- Add a helpful dialog above the password reset form
- Workaround for registration form layout issues
- Remove the login form from completed registration
- Bootstrap icons for the login form
- Remove the login form from the main content area
Welcome to RocketGeek Interactive › Forums › Plugins › WP-Members › WP-Members Documentation › Filter Hooks › wpmem_login_form