Simple History 5.6 released with new Stealth Mode

This version adds a much-requested feature: the ability to completely hide the Simple History GUI.

Introducing Stealth Mode

Simple History 5.6 brings a powerful new feature: Stealth Mode. With Stealth Mode enabled, Simple History can operate completely behind the scenes, hidden from the WordPress admin interface. This is perfect for web agencies, developers, or administrators who want to monitor activity without exposing the logs to others.

Two Modes of Stealth

Stealth Mode offers two distinct levels of control: Full Stealth Mode, which completely hides Simple History, and Partial Stealth Mode, which allows selected users to access the plugin.

In both modes Simple History is hidden from:

  • Admin menu
  • Admin bar
  • Dashboard
  • List of Installed Plugins

The event log remains accessible via the REST API, RSS feed, and WP-CLI, so system administrators and similar still can access the log.

In Partial Stealth Mode the GUI is also hidden but there is a list of users that have access to the admin, meaning that a selection of users can access the log just as before. A nice touch of this list is that is supports “wildcard” emails, so if you add “@mycompany.org” that means that all users who have an email that ends with “@mycompany.org” will have GUI access. If only a few users should have access than just enter them comma separated, like “user1@mycompany.org,anotheruser@example.com” and so forth.

Examples

Enable Full Stealth Mode:

// Enable Full Stealth Mode for all users using a constant.
define('SIMPLE_HISTORY_STEALTH_MODE_ENABLE', true);

// Enable Full Stealth Mode for all users using a filter.
add_filter('simple_history/full_stealth_mode_enabled', '__return_true');

Enable Partial Stealth Mode:

// Using a constant to enable Partial Stealth Mode for all users except the the ones specified here:
define('SIMPLE_HISTORY_STEALTH_MODE_ALLOWED_EMAILS', '@example.com, @earthpeople.se, xpar@earthpeople.se,par.thernstrom@gmail.com');

// Using a filter to enable Partial Stealth Mode for all users except the ones in the array in the function:
add_filter(
    'simple_history/stealth_mode_allowed_emails',
    function () {
        return [
            '@example.com',
            '@anotherdomain.org',
            'jane@organization.org',
            'john@organization.org',
            '@earthpeople.se',
            'contact@simple-history.com',
        ];
    }
);

To see see users with access to Partial Stealth Mode you can visit the debug page:

Please note that there is no way to see in the GUI that Full Stealth Mode is enabled due to the fact that the GUI is hidden to all users.

Use WP-CLI to view the log Full Stealth Mode

When Full Stealth Mode is activated you can use WP-CLI so check the logs.

Example: using WP-CLI to check if Stealth Mode is active:

$ wp simple-history stealth-mode status

+----------------------+----------+
| mode                 | status   |
+----------------------+----------+
| Full Stealth Mode    | Disabled |
| Partial Stealth Mode | Enabled  |
+----------------------+----------+

Example: using WP-CLI to view the log, even when Stealth Mode is active:

$ wp simple-history event list --count=4

+-------+---------------------+--------------------------+-----------------------------------------------------------------+-----+---------+-------+
| ID    | date                | initiator                | description                                                     | via | level   | count |
+-------+---------------------+--------------------------+-----------------------------------------------------------------+-----+---------+-------+
| 49736 | 2025-01-26 16:28:49 | par (par@earthpeople.se) | Updated page "About our company"                                |     | info    | 1     |
| 49735 | 2025-01-26 16:28:34 | par (par@earthpeople.se) | Updated translations for "WooCommerce" (sv_SE)                  |     | info    | 2     |
| 49733 | 2025-01-26 16:28:28 | par (par@earthpeople.se) | Updated plugin "WooCommerce" to 9.6.0 from 9.5.2                |     | info    | 1     |
| 49732 | 2025-01-26 16:28:07 | Anonymous web user       | Failed to login with username "admin" (username does not exist) |     | warning | 2     |
+-------+---------------------+--------------------------+-----------------------------------------------------------------+-----+---------+-------+

New setting for menu page location

Also in the version is a new setting, so admins better can control the location of the main history page. It can now be placed at the top of the admin menu (default) or at the bottom, to give the log a less prominent location.

Changelog

Added

  • Add support for Stealth Mode. When enabled, Simple History will not show up anywhere in the GUI. #401
  • Add wp-cli command simple-history stealth-mode status to get status of Stealth Mode using wp-cli.
  • Add option to set menu page location to settings page. #525
  • Add filter simple_history/show_admin_menu_page to
  • Add filter simple_history/admin_menu_location.
  • Add filters simple_history/show_in_admin_bar and simple_history/show_on_dashboard, that work the same way as simple_history_show_in_admin_bar and simple_history_show_dashboard_widget, but with correct naming convention.

Improved

  • Decrease the icon size in the admin bar and main menu, to match the size of other icons. Props @hjalle.

Fixed

  • Fix for simple_history/show_action_link when being used and returning false then the other action links was not shown.