內容簡介
Wp log 是一個簡單的外掛,可以將動作記錄在資料庫中,也可以將動作發送到郵件中。
Wp log 可以記錄以下動作:
使用者登入
使用者登出
使用者註冊
使用者刪除
文章編輯
文章刪除
佈景主題切換
新增評論
評論核准
評論取消核准
外掛啟用
外掛停用
外掛有一個實用的選項面板,讓您定義哪些動作可以保存在資料庫中或以電子郵件方式發送。
函式:
wl_logs_action_row()
回傳已儲存在資料庫中的資料。 回傳的資料是陣列。
<?php echo wl_logs_action_row(‘action_name’,’ip_address’,’127.0.0.1′,’10’,’date’,’ASC’); ?>
第 1 個參數是輸出的資料,可以是:
* - 一切動作
action_name - 動作名稱
ip_address- 回傳 IP 位址
date - 動作日期
data - 額外的資料(需要被反序列化)
第 2 個參數是過濾器關鍵字。
第 3 個參數是顯示項目數量
第 4 個參數是依照順序顯示項目,可以是日期、IP 位址、ID。
第 5 個參數是順序,可以是 ASC 或 DESC。
範例:
顯示特定 IP 的最新動作:
<?php echo wl_logs_action_row(‘action_name’,’ip_address’,’YOUR IP ADDRESS’,’10’,’date’,’ASC’); ?>
顯示最新動作的所有內容:
<?php echo wl_logs_action_row(‘*’); ?>
僅顯示最新動作的名稱:
<?php echo wl_logs_action_row(‘action_name’); ?>
顯示最新動作的 IP 位址:
<?php echo wl_logs_action_row(‘ip_address’); ?>
自訂區段 1
外掛標籤
開發者團隊
原文外掛簡介
Wp log is simple plugin to save actions in database. Also actions can be sent to mail.
Wp log can record:
User Login
User Logout
User Register
User Delete
Post Edit
Post Delete
Theme Switch
New Comment
Comment Approved
Comment Unapproved
Plugin Activated
Plugin Deactivated
There is a useful option panel for plugin that let you to define which actions can be saved in database or send it in email.
Function:
wl_logs_action_row()
Return saved data in database. Return data is an array.
Parameter 1 is output data that can be:
* – everything
action_name – action name
ip_address – return ip address
date – date of the action
data – extra data (need to be unserialized)
Parameter 2 is filter key.
Prameter 2 is filter value
parameter 3 is displayed items count
Parameter 4 is items order by that can be date, ip_address, id
Parameter 5 is order that can be ASC or DESC
Samples:
Display latest actions from specific ip:
Display every thing of latest actions:
Display only name of latest actions:
Display latest actions ip address:
Arbitrary section 1
