[WordPress] 外掛分享: BTEV

首頁外掛目錄 › BTEV
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
100+
安裝啟用
★★★★★
5/5 分(1 則評價)
4382 天前
最後更新
問題解決
WordPress 3.2+ v2.0.2 上架:2007-04-20

內容簡介

Bluetrait Event Viewer 2 現已推出!

Bluetrait Event Viewer (BTEV) 監控發生在你的 WordPress 安裝中的事件(例如失敗的登入嘗試)。

如果你需要監控多個 WordPress 安裝,你可以透過受密碼保護的 RSS 傳遞發佈這些事件。

如果你有任何評論、提示、要求等,請聯繫我,或者我在 Twitter 上的 @mwdale 上。

BTEV 追蹤以下事件:

password_reset
delete_user
wp_login
lostpassword_post
profile_update
add_attachment
wp_logout
user_register
switch_theme
publish_post
監控其他外掛的啟用/停用

請注意,此外掛每週會打電話至官方網站檢查更新。
唯一發送的資訊是安裝的 Bluetrait Event Viewer 目前版本。

事件 API

你可以將自己的事件添加到事件查看器中,只需在需要添加條目時調用以下函數:

btev_trigger_error($error_string, $error_number, __FILE__, __LINE__);

或者

btev_trigger_error($error_string, $error_number);

參數描述:

$error_string: 此值可以是任何字符串,用於事件查看器中的描述字段。
$error_number: 此值可以是以下之一:E_USER_ERROR、E_USER_WARNING、E_USER_NOTICE。這些值決定事件查看器中訊息的類型(錯誤、警告、通知)。
__FILE__: 這是發生事件的文件,請注意 __FILE__ 是一個 PHP 預定義變量。此值決定來源。
__LINE__: 這是發生事件的行,請注意 __LINE__ 是一個 PHP 預定義變量。

例如:

btev_trigger_error('登入成功:"' . $user_login . '"', E_USER_NOTICE);

或者

btev_trigger_error('登入成功:"' . $user_login . '"', E_USER_NOTICE, __FILE__, __LINE__);

注意:你應該檢查插件是否啟用。最簡單的方法如下:

if (function_exists('btev_trigger_error')) {
btev_trigger_error('登入成功:"' . $user_login . '"', E_USER_NOTICE);
}

外掛標籤

開發者團隊

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

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

原文外掛簡介

Bluetrait Event Viewer 2 is now out!
Bluetrait Event Viewer (BTEV) monitors events (such as failed login attempts) that occur in your WordPress install.
You can publish these events via a password protected RSS feed if you need to monitor multiple WordPress installs.
If you have any comments/tips/requests etc please contact me or I am on twitter @mwdale
BTEV tracks the following events:

password_reset
delete_user
wp_login
lostpassword_post
profile_update
add_attachment
wp_logout
user_register
switch_theme
publish_post
monitors activation/deactivation of other plugins

Please be aware that this plugin will phone home once a week to check for updates.
The only information sent is the current version of Bluetrait Event Viewer installed.
Event API
It is possible to add your own events to the event viewer. Simply call the following function when you want add an entry:
btev_trigger_error($error_string, $error_number, __FILE__, __LINE__);

or
btev_trigger_error($error_string, $error_number);

Argument Descriptions:

$error_string: This value can be any string, it is used in the description field in the event viewer.
$error_number: This value can be one of the following: E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE. These values determine the type of message in the event viewer (Error, Warning, Notice).
__FILE__: This is the file where the event occurred, please note __FILE__ is a PHP predefined variable. This value determines the source.
__LINE__: This is the line where the event occurred, please note __LINE__ is a PHP predefined variable.

So an example would be:
btev_trigger_error('Login Successful: "' . $user_login . '"', E_USER_NOTICE);

or
btev_trigger_error('Login Successful: "' . $user_login . '"', E_USER_NOTICE, __FILE__, __LINE__);

NOTE: You should check to make sure that the plugin is active. The easiest way to do this is as follows:
if (function_exists('btev_trigger_error')) {
btev_trigger_error('Login Successful: "' . $user_login . '"', E_USER_NOTICE);
}

延伸相關外掛

文章
Filter
Mastodon