Skip to main content
Rename Events in Logtivity – Logtivity Rename Events in Logtivity - Logtivity

Rename Events in Logtivity

It is possible to rename the events that are stored in Logtivity’s logs.

For example, you can add this code to your site’s functions.php file. This code will result in an event “File Downloaded” being logged as “Resource Downloaded”.

add_action('wp_logtivity_instance', function($Logtivity_Logger) {
    if (strpos($Logtivity_Logger->action, 'File Downloaded') !== false) {
        $Logtivity_Logger->setAction('Resource Downloaded');
    }
});