login_form_defaults WordPress Filter Hook

The login_form_defaults hook allows you to change the default values for the login form. This can be useful if you want to change the default message or the default redirect URL.

apply_filters( 'login_form_defaults', array $defaults ) #

Filters the default login form output arguments.


Description

Top ↑

See also


Top ↑

Parameters

$defaults

(array)An array of default login form arguments.


Top ↑

More Information

The defaults set in the wp_login_form() function are as follows:

$defaults = array(
	'echo' => true,
	'redirect' => ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'],
	'form_id' => 'loginform',
	'label_username' => __( 'Username' ),
	'label_password' => __( 'Password' ),
	'label_remember' => __( 'Remember Me' ),
	'label_log_in' => __( 'Log In' ),
	'id_username' => 'user_login',
	'id_password' => 'user_pass',
	'id_remember' => 'rememberme',
	'id_submit' => 'wp-submit',
	'remember' => true,
	'value_username' => '',
	'value_remember' => false, // Set this to true to default the "Remember me" checkbox to be checked.
);

Top ↑

Source

File: wp-includes/general-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More