AIサマリー
説明
について wpforms_user_registration_process_registration_process_username_exists_error_message フィルタは、ユーザ名が既に存在する場合に、ユーザ登録アドオンでメッセージを提供するために使用されます。
パラメータ
- msg
- (文字列)username がすでに存在 し ている と き に表示 さ れ る メ ッ セージ。
ソース
wpforms-user-registration/src/Process/Registration.php
詳細情報
このフィルターは、ユーザー名がすでに存在する場合にメッセージを表示するために使われる。
例
/**
* 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 );