PHP code example of cupracode / wp-activity-log

1. Go to this page and download the library: Download cupracode/wp-activity-log library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cupracode / wp-activity-log example snippets


use CupraCode\WPActivityLog\ActivityLogAdmin;

$activity_log_admin = ActivityLogAdmin::getInstance();

// Log ACF field changes for posts, pages and a custom post type named 'photo'
$activity_log_admin->addPostType('post');
$activity_log_admin->addPostType('page');
$activity_log_admin->addPostType('photo');

$activity_log_admin->setPaginationPerPage(25)

$activity_log_admin->setEntryIdOverride([
    'column_name' => 'Ref. Num',
    'column_meta_key' => 'reference_no'
]);