Simple History Blog

Changes to featured image (post thumbnails) logged

Yep. Finally!

Here’s how it looks:

Screenshot showing how a post with changed featured image looks in the audit log in Simple History

Also in this version:

  • The preview image of uploaded images now uses the default WordPress image size small, instead of a custom image size. Also these mage previews are now abit smaller because many uploaded images could make the log a bit to long and not so quick to overview.
  • JavaScript library Select2 is updated to the latest version.
  • If a user is running a very old version of WordPress, that is incompatible with Simple History, a message is shown, informing the user that their WordPress is to old.
  • An error with PHP 7.1 was fixed.

WP-Optimize adds support for Simple History

WordPress plugin WP-Optimize is a great plugin that optimizes the database and tables that your WordPress installation uses.

The authors explain it as:

WP-Optimize is an effective tool for automatically cleaning your WordPress database so that it runs at maximum efficiency.

With over 600,000 installs and a 5 star medium rating I can say that I’m happy to see that they have added support for Simple History in their plugin. In the settings page there is a setting that enables logging actions you perform in WP-Optimize to Simple History.

» Read full blog post

Log when a user enters a password on a password protected page

Over at the forums on wordpress.org there was a user who asked if it was possible to log whenever a user entered the password on a password protected page.

To add this kind of log to Simple History is easy, we just need to hook onto an admin filter and do some checks. The final answer, that I also posted to the user in the forums, was this:

// Log when a user enters something into the post password form.
// Both correct and incorrect usage is logged.
add_action( 'login_form_postpass', function() {
    $postPass = isset($_POST['post_password']) ? $_POST['post_password'] : null;

    if (!$postPass) {
        return;
    }

    $urlPath = parse_url(wp_get_referer(), PHP_URL_PATH);
    $pageByPath = get_page_by_path($urlPath);

    if (!$pageByPath) {
        return;
    }

    $correctPasswordEntered = ($pageByPath->post_password === $postPass);

    if ($correctPasswordEntered) {
        apply_filters(
            'simple_history_log',
            'A user correctly entered the password for page "{page_name}"',
            array('page_name' => $pageByPath->post_title)
        );
    } else {
        apply_filters(
            'simple_history_log',
            'A user entered the wrong password for page "{page_name}"',
            array('page_name' => $pageByPath->post_title)
        );
    }
});

WP CLI command added and file edits now logged

WP CLI command to view user activity is now added to Simple History. The current support is pretty basic, but it’s a nice addition anyway I must say.

A simple wp simple-history list command will give you a listing of the latest events. You can also pass arguments count=20 to show 20 events instead of the default 10. And pass argument format=json to output the list in JSON format instead of the ASCII table.

Also in this version: theme file edits are logged, with a “quick diff” showing what’s been changed.

Support for Redirection plugin added

With over 600.000 active installs the Redirection plugin is a pretty popular WordPress plugin. So when there was a request for supporting it I agreed it would be a good idea to add support for it.

So in the latest version of Simple History there is now support for the plugin Redirection. The following things are logged:

  • Redirects created, changed, enabled or disabled
  • Groups that are created, changed, enabled or disabled
  • Global plugin settings

Here’s a screenshot of how it looks in action:

simple-history-redirection-plugin

Available updates to WordPress, plugins and themes now logged

With the latest update of Simple History the log will show the available updates to plugins, themes and WordPress core that are found.

This is a great feature to have if you for example subscribe to the history RSS feed. You no longer need to manually check the updates-page to see if there are any updates.

Here you can see how it looks when an update to WordPress is found and then the update is installed. It’s all there in the history log:

available-updates

And here’s how it can look in your RSS-reader when you get notified that WordPress has auto-updated:

updated-logged-in-rss-feed

About Simple History

Simple History is an activity feed plugin for WordPress.

Archives