[WordPress] 外掛分享: WP Edit Username

首頁外掛目錄 › WP Edit Username
WordPress 外掛 WP Edit Username 的封面圖片
2,000+
安裝啟用
★★★★★
5/5 分(5 則評價)
101 天前
最後更新
問題解決
WordPress 5.6+ PHP 8.0+ v2.0.5 上架:2018-04-25

內容簡介

這個外掛提供了編輯 / 更改使用者使用者名稱的功能。

功能:

編輯使用者名稱。
只有具有 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

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.0.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP Edit Username」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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:

延伸相關外掛

文章
Filter
Mastodon