1 | <?php |
---|
2 | /** |
---|
3 | * @package Test_Login_Hooks |
---|
4 | * @version 1.6 |
---|
5 | */ |
---|
6 | /* |
---|
7 | Plugin Name: Test Login Hooks |
---|
8 | Description: Test login hooks |
---|
9 | Author: Jodi Warren |
---|
10 | Version: 0.1 |
---|
11 | Author URI: http://www.jodiwarren.com/ |
---|
12 | */ |
---|
13 | |
---|
14 | function loginFailed( $username ) { |
---|
15 | die('<h1>Login failed, ' . $username . '</h1>'); |
---|
16 | } |
---|
17 | add_action('wp_login_failed', 'loginFailed'); |
---|
18 | |
---|
19 | function emptyUsername() { |
---|
20 | die('<h1>Empty Username</h1>'); |
---|
21 | } |
---|
22 | add_action('wp_login_failed_empty_username', 'emptyUsername'); |
---|
23 | |
---|
24 | function emptyPassword( $username ) { |
---|
25 | die('<h1>Where\'s your password ' . $username . '?</h1>'); |
---|
26 | } |
---|
27 | add_action('wp_login_failed_empty_password', 'emptyPassword'); |
---|