Title: Activity Logs
Author: tbuteler
Published: <strong>2013 年 5 月 25 日</strong>
Last modified: 2013 年 5 月 25 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/activity-logs.svg)

# Activity Logs

 由 [tbuteler](https://profiles.wordpress.org/tbuteler/) 開發

[下載](https://downloads.wordpress.org/plugin/activity-logs.1.1.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/activity-logs/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/activity-logs/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/activity-logs/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/activity-logs/#developers)

 [技術支援](https://wordpress.org/support/plugin/activity-logs/)

## 外掛說明

The Activity Logs plugin will record most of the changes that occur in your WordPress
blog or multisite network, making it easy for you to keep on track of what everyone
is doing, or to catch up on what happened since you last checked in.

It’s a very simple to use plugin (though it offers good extensibility to advanced
users and plugin authors): just activate it and the logs will be recorded automatically,
and an activity stream will appear on your dashboard.

The Activity Logs plugin keeps track of post, pages, custom post types and comments
transitions, settings changes, plugin activations, import, export, user and site
management in a simple, seamless way.

### Feedback and Support

Comments are welcome. You can contact me directly via tbuteler@gmail.com.
 If you
think you’ve found a bug, or you want to make this plugin better, go to [GitHub](https://github.com/tbuteler/ck_activity_logs).
Did you find this helpful? Did it save you precious programming time? Please consider
[donating](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5H36WT4G7XBKQ).

## 螢幕擷圖

 * [[
 * The Activity Log widget rendered on the default dashboard.

## 安裝方式

 1. Unpackage contents to your wp-content/plugins/ directory;
 2. Activate the plugin through the ‘Plugins’ menu in WordPress;
 3. That’s it! The plugin will install required tables and configure itself on first
    run.

## 常見問題集

### I don’t see a settings page for this plugin. Can I configure it somehow?

A little bit, yes. Although the idea is to allow users to install and forget, admins
have some configuration options available. To do so, define the constants below 
in your `wp-config.php` file (or anywhere else, as long as they’re defined before
the `init` action takes place).

Values defined here are the plugins defaults, which can be overriden.

Time range, in seconds, that will cause our activity log to ignore repeat actions.
Note that activity will still be logged, but won’t be displayed in the dashboard:

    ```
    // Logs 60 seconds apart will be treated as the same action (same type, same logger only)
    define('CK_LOG_TIME_IGNORE', 60);
    ```

Maximum number of rows reserved for activity logs in custom table:

    ```
    // 0 means no limit
    define('CK_LOG_MAX_ROWS', 0);
    ```

Amount of logs to load on dashboard widget at a time:

    ```
    define('CK_LOG_DEFAULT_LIMIT', 25);
    ```

### Can I create my own loggers?

Yes. There are many filters and actions to hook into, but the default loggers take
into account core functionality only. This includes custom post types, but not custom
functionality which most plugins add to WordPress. Luckily, you can easily set your
own loggers by using the following function:

    ```
    cookspin_register_logger(
        $name,      // A slug-like name for this logger, shorter than 255 characters
        $category,  // A slug-like name for the logger's category. For the default list, see below
        $args       // See below
    );
    ```

Here are the default categories (and slugs) for loggers. These are meant to mimick
the default sections of the WordPress admin menu. Your custom logger can go into
any of these, and you can create your own categories as well (though you will have
to specify labels and CSS / icons via filters):

 1. Sites: `blogs`
 2. Posts: `posts`
 3. Media: `media`
 4. Users: `users`
 5. Settings: `preferences`
 6. Appearance: `comments`
 7. Plugins: `appearance`
 8. Tools: `tools`

The third and final argument of the function is actually an array of arguments. 
Let’s go through the options one by one. (Note that omitting “required” arguments
might not cause the function to fail, but will prevent the log from displaying properly.)

 1. `hook` (string)(required): Which action should we hook to? Every time it fires,
    our log will record an entry. **Important:** If you’re hooking to filters and not
    actions, set the `hook_to_filter` argument to `true`
 2. `priority` (integer)(optional): Priority of the logger function compared to all
    other functions hooked to this action.
 3. `n_params` (integer)(optional): How many arguments does the logger function need
    from the action? If more than one, this has to be specified.
 4. `cb` (string)(required): The actual callback which will define what information
    gets recorded on the database.
 5. `print_cb` (string)(required): A callback which is used to generate a readable 
    version of the log.
 6. `hook_to_filter` (boolean)(optional): Do you want to log something everytime a 
    _filter_ is applied? You can do that too, but you **need to set this to true**.
    Failure to do so will prevent the filter you’re hooking to from working properly,
    and can break stuff.
 7. `ignore_cmp` (string or array of strings)(optional): Sometimes ignoring logs based
    on the time they were recorded is not enough to prevent you from showing actions
    which have no actual impact. Here you can specify any of the following, which correspond
    to the activity log’s table columns: ‘object_type’, ‘object_id’, ‘log_code’, ‘user_id’.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Activity Logs〉的開發相關工作。

參與者

 *   [ tbuteler ](https://profiles.wordpress.org/tbuteler/)

[將〈Activity Logs〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/activity-logs)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/activity-logs/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/activity-logs/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/activity-logs/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/activity-logs/)。

## 變更記錄

#### 1.1

 * Initial public release.

## 中繼資料

 *  版本 **1.1**
 *  最後更新 **13 年前**
 *  啟用安裝數 **20+**
 *  WordPress 版本需求 ** 3.0.1 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.5.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/activity-logs/)
 * 標籤:
 * [activity](https://tw.wordpress.org/plugins/tags/activity/)
 *  [進階檢視](https://tw.wordpress.org/plugins/activity-logs/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/activity-logs/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/activity-logs/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/activity-logs/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/activity-logs/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/activity-logs/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/activity-logs/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/activity-logs/reviews/)

## 參與者

 *   [ tbuteler ](https://profiles.wordpress.org/tbuteler/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/activity-logs/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5H36WT4G7XBKQ)