wpum_login_form()

This is a wrapper function of the  wp_login_form() function. It supports the same arguments as wp_login_form. With the addition of 3 new ones.

  • The function redirects the user after login to the page selected into the admin panel.
  • The label of the "username" field is determined by the login method selected into the admin panel.
  • login_link parameter if set to yes - displays a link to the login page below the form.
  • psw_link parameter if set to yes - displays a link to the password recovery page below the form.
  • register_link parameter if set to yes - displays a link to the registration page below the form. 

The login form will use the forms/login-form.php template to display the form.

Logged in users will display an "already logged in" message if they are logged in.

Links to the page are automatically retrieved based on the pages selected into the admin panel.

Default arguments:

$defaults = array(
	'echo' => true,
	'redirect' => wpum_get_login_redirect_url() ,
	'form_id' => null,
	'label_username' => wpum_get_username_label() ,
	'label_password' => __('Password', 'wpum') ,
	'label_remember' => __('Remember Me', 'wpum') ,
	'label_log_in' => __('Login', 'wpum') ,
	'id_username' => 'user_login',
	'id_password' => 'user_pass',
	'id_remember' => 'rememberme',
	'id_submit' => 'wp-submit',
	'login_link' => 'yes',
	'psw_link' => 'yes',
	'register_link' => 'yes'
);