[WordPress] 外掛分享: wp_mail to XMPP

首頁外掛目錄 › wp_mail to XMPP
10+
安裝啟用
尚無評分
3752 天前
最後更新
問題解決
WordPress 3.6+ v1.0 上架:2013-12-27

內容簡介

這個外掛可以向註冊並設置他們自己的 Jabber ID 的用戶發送 XMPP 通知。可以禁止向他們發送電子郵件。

這個外掛提供了一個功能,可以在 wp_mail 中添加「wp_mail」 hook,位於 wp-includes/pluggable.php。

這個外掛需要 XMPP Enabled 外掛。

篩選器 Hook

這個外掛中的 xmpp_sender() 函数有兩個篩選器 hook。

使用「abort_xmpp_sender」 hook 可以中止所有處理。例如,當主題具有特定關鍵字時,您可能希望獨立於用戶或 JID 發送電子郵件。您可以添加一個檢查主題並返回 true 的函數。

使用「email_to_jid」 hook 可以設置 / 取消與電子郵件地址對應的 JID。此 hook 的預設功能 email2jid() 在該用戶註冊到網站並設置其 JID 時返回 JID。如果您想向一個特定的用戶發送電子郵件但不是 XMPP,則可以添加返回 false 的函數。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0) 或搜尋安裝

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

原文外掛簡介

This plugin sends XMPP notifications to the users who are registered and set their own Jabber ID. Emails to them are able to be suppressed.
This plugin provides a function to be added ‘wp_mail’ hook in wp_mail() located in wp-includes/pluggable.php.
This plugin requires XMPP Enabled plugin.
Filter Hook
The function xmpp_sender() in this plugin has two filter hooks.
Using ‘abort_xmpp_sender’ hook allow abort all processing. For example, you want to send email independent of user or JID when the subject has a particular keyword. You may add a function which checks the subject and returns true if keyword is found.
Using ’email_to_jid’ hook allow set/unset JID correspond to email address. Default function of this hook, email2jid() returns JID when the user is registered to the site and his/her JID is set. If you want to send email but XMPP to a particular user, add a function which returns false.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon