This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function authenticate_with_email( $user, $email, $password ) { | |
if ( is_wp_error( $user ) ) { | |
// Already failed | |
return $user; | |
} | |
if( empty( $email ) || empty ( $password ) ) { | |
$error = new WP_Error(); | |
if ( empty( $email ) ) { | |
$error->add( 'empty_username', __( '<strong>ERROR</strong>: Email field is empty.' ) ); |