bonny/wordpress-simple-history

直接在您的仪表板或单独的页面上查看WordPress中的最近更改。


README

Plugin rating: 5 stars Number of active installs: over 100K Number of monthly downloads

WordPress活动日志,记录重要事项

Simple History是一个WordPress审计日志插件,它会记录WordPress中发生的事情,并将这些事件以非常友好的GUI形式展示出来。
这是查看用户活动和监视网站管理员用户正在做什么的绝佳方式。

安装

WordPress.org下载并激活。

使用方法

查看历史事件

此截图显示用户活动源

  • 正在使用活动 过滤器/搜索
    • 仅显示特定用户执行的操作
    • 仅显示类型为帖子、页面和媒体(即图片和其他上传)的事件
  • 显示上传图片的缩略图

Simple History screenshot

不同严重程度的事件

Simple History使用PHP PSR-3标准中指定的日志级别。

快速差异让您查看更改内容

Simple History screenshot

事件具有上下文和额外细节

每个已记录的事件都可以包含有用的富格式额外信息。例如:插件安装可以包含作者信息和插件的URL,上传的图片可以包含图片的缩略图。

Simple History screenshot

插件API

开发者可以轻松地使用简单的API记录他们自己的内容

<?php

// This is the easiest and safest way to add messages to the log
// If the plugin is disabled this way will not generate in any error
apply_filters('simple_history_log', 'This is a logged message');

// Or with some context and with log level debug:
apply_filters(
	'simple_history_log',
	'My message about something',
	[
		'debugThing' => $myThingThatIWantIncludedInTheLoggedEvent,
		'anotherThing' => $anotherThing
	],
	'debug'
);

// Or just debug a message quickly
apply_filters('simple_history_log_debug', 'My debug message');

// You can also use functions/methods to add events to the log
SimpleLogger()->info("This is a message sent to the log");

// Add events of different severity
SimpleLogger()->info("User admin edited page 'About our company'");
SimpleLogger()->warning("User 'Jessie' deleted user 'Kim'");
SimpleLogger()->debug("Ok, cron job is running!");

您可以在examples.php文件中找到更多示例。

开发

运行测试

查看tests目录中的README

赞助商

通过成为赞助商支持Simple History的免费版本。您可以使用PayPal成为GitHub赞助商进行赞助。