
內容簡介
這個外掛提供了編輯 / 更改使用者使用者名稱的功能。
功能:
編輯使用者名稱。
只有具有 edit_other_users() 能力的使用者可以編輯使用者名稱。
當使用者名稱更改後,如果選中發送電子郵件,一封電子郵件將發送到使用者的電子郵件地址,通知他們有關使用者名稱的更改!
您可以在管理儀表板中和通過篩選器勾子修改電子郵件文字和主題。
通過篩選器 wp_username_changed_email_subject 更改電子郵件主題。
通過篩選器 wp_username_changed_email_body 更改電子郵件主體文本($new_username 和 $old_username 始終附加在電子郵件文本的前面)。
勾子用法:
<?php
add_filter( "wp_username_changed_email_subject", "your_function" );
your_function($subject){
$subject = '您自訂的主題';
return $subject;
}
add_filter( "wp_username_changed_email_body", "your_function" );
function your_function($$old_username,$new_username){
$email_body = "您自訂的電子郵件文字。";
return $email_body;
}
?>
有興趣參與 WP Edit Username 的開發嗎?
請聯繫我 sagorh672(at)gmail.com
外掛標籤
開發者團隊
原文外掛簡介
This plugin adds feature to edit/change user username.
Features:
Edit Username: Allows editing of usernames.
Only users with the edit_other_users() capability can change usernames.
If the “Send Email” option is enabled, the user will receive a notification email when their username is changed.
You can customize the email subject and body text in the admin dashboard or via filter hooks.
Modify the email subject using the filter: wpeu_email_subject.
Modify the email headers using the filter: wpeu_email_headers.
Adjust the email body content using the filter wpeu_email_body. (Note: $new_username and $old_username are automatically prepended to the email content).
Hooks Usage:
