Riassunto AI
Descrizione
Il filtro wpforms_user_registration_process_registration_process_user_email_exists_error_message veniva utilizzato per fornire un messaggio sull'addon User Registration se l'indirizzo email esisteva già.
Parametri
- $msg
- (string) Messaggio che viene visualizzato se l'indirizzo email è già stato utilizzato.
Origine
wpforms-user-registration/src/Process/Registration.php
Maggiori Informazioni
Il filtro viene utilizzato per visualizzare un messaggio all'utente se l'indirizzo email esiste già per un altro utente.
Esempio
/**
* Check email address exists.
*
* @link https://wpforms.com/developers/wpforms_user_registration_process_registration_process_user_email_exists_error_message/
*
* @param string $msg Message that displays if email exists.
* @return string
*/
function wpf_dev_user_registration_email_exists( $msg ) {
// This is the message that would appear
$msg = __('A user with that username already exists. Please <a href="http://yourdomain/wp-admin/">log in here</a> to your account.', 'text-domain');
return $msg;
}
add_filter( 'wpforms_user_registration_process_registration_process_user_email_exists_error_message', 'wpf_dev_user_registration_email_exists', 10, 1 );
Articoli di riferimento
\Come modificare i messaggi di convalida per l'addon di registrazione utente