Descrição
O wpforms_user_registration_process_registration_process_username_exists_error_message
filtro usado para fornecer uma mensagem no addon User Registration se o nome de usuário já existir.
Parâmetros
- $msg
- (string) Mensagem que será exibida se o nome de usuário já existir.
Fonte
wpforms-user-registration/src/Process/Registration.php
Mais informações
O filtro é usado para exibir uma mensagem se o nome de usuário já existir.
Exemplo
/** * Username already exists. * * @link https://wpforms.com/developers/wpforms_user_registration_process_registration_process_username_exists_error_message/ * * @param string $msg Message that displays if username already exists. * @return string */ function wpf_dev_user_registration_username_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_username_exists_error_message', 'wpf_dev_user_registration_username_exists', 10, 1 );
Artigos de referência
Como alterar as mensagens de validação do addon Registro de usuário