login_enqueue_scriptsaction-hookWP 3.1.0

Allows you to enqueue scripts and styles on the wp-login.php page.

Use the login_head hook when you need to output something other than scripts and styles in the <head> section of the wp-login.php page.

Usage

add_action( 'login_enqueue_scripts', 'wp_kama_login_enqueue_scripts_action' );

/**
 * Function for `login_enqueue_scripts` action-hook.
 * 
 * @return void
 */
function wp_kama_login_enqueue_scripts_action(){

	// action...
}

Examples

#1 Enqueue a stylesheet on the wp-login.php page

add_action( 'login_enqueue_scripts', 'wp_kama_custom_login_stylesheet' );

// Outputs the style tag and its content on the wp-login.php page
function wp_kama_custom_login_stylesheet() {
	wp_enqueue_style( 'wp-kama-login-css', get_template_directory_uri() . '/css/login-styles.css' );
}

Changelog

Since 3.1.0 Introduced.

Where the hook is called

login_header()
login_enqueue_scripts
wp-login.php 120
do_action( 'login_enqueue_scripts' );

Where the hook is used in WordPress

Usage not found.