Skip to content

bonny/WordPress-Simple-History

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
April 25, 2022 08:38
October 20, 2022 08:27
February 7, 2023 19:57
February 7, 2022 21:23
js
January 18, 2022 15:28
February 7, 2022 14:28
February 6, 2022 20:44
January 14, 2022 19:50
October 20, 2021 21:04
August 29, 2020 21:28
August 29, 2020 21:28
December 27, 2022 09:35
February 7, 2023 20:09
February 7, 2023 20:09
January 14, 2022 19:51
February 7, 2023 20:09
November 29, 2021 21:45

Simple History – a WordPress activity log for what matters

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

Simple History is a WordPress audit log plugin that logs various things that occur in WordPress and then presents those events in a very nice GUI. It's great way to view user activity and keep an eye on what the admin users of a website are doing.

Download from WordPress.org:
https://wordpress.org/plugins/simple-history/

Screenshots

Viewing history events

This screenshot show the user activity feed:

  • It has an active filter/search in use:
    • only show changes performed by a specific user
    • it only shows event that are of type post and pages and media (i.e. images & other uploads)
  • A thumbnail is shown for the image that is uploaded

Simple History screenshot

Events with different severity

Simple History uses the log levels specified in the PHP PSR-3 standard.

Quick diff lets you see what's changed

Simple History screenshot

Events have context with extra details

Each logged event can include useful rich formatted extra information. For example: a plugin install can contain author info and a the url to the plugin, and an uploaded image can contain a thumbnail of the image.

Simple History screenshot

Plugin API

Developers can easily log their own things using a simple 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!");

You will find more examples in the examples.php file.

Running tests

Tests are located in the tests-folder. See ./tests/readme.md.