WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
97 |
|
98 | // Is a user's blog marked as spam? |
99 | if ( !is_super_admin( $userdata->ID ) && isset($userdata->primary_blog) ) { |
100 | $details = get_blog_details( $userdata->primary_blog ); |
101 | if ( is_object( $details ) && $details->spam == 1 ) |
102 | return new WP_Error('blog_suspended', __('Site Suspended.')); |
103 | } |
104 | } |
105 |
|
106 | $userdata = apply_filters('wp_authenticate_user', $userdata, $password); |
107 | if ( is_wp_error($userdata) ) |
108 | return $userdata; |
109 |
|
110 | if ( !wp_check_password($password, $userdata->user_pass, $userdata->ID) ) |
111 | return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s" title="Password Lost and Found">Lost your password</a>?' ), |
112 | $username, site_url( 'wp-login.php?action=lostpassword', 'login' ) ) ); |
113 |
|
114 | $user = new WP_User($userdata->ID); |
115 | return $user; |