HEX
Server: nginx/1.18.0
System: Linux vps-9dcdb12e 5.15.0-176-generic #186-Ubuntu SMP Fri Mar 13 11:01:42 UTC 2026 x86_64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.24
Disabled: exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
Upload Files
File: /var/www/epli.pl/wp-content/plugins/wp-statistics/functions.php
<?php
use WP_Statistics\Service\CustomEvent\CustomEventDataParser;
use WP_Statistics\Models\EventsModel;

if (!function_exists('wp_statistics_event')) {
    function wp_statistics_event($eventName, $eventData = []) {
        try {
            // Parse event data
            $eventDataParser = new CustomEventDataParser($eventName, $eventData);
            $parsedData      = $eventDataParser->getParsedData();

            // Insert event into the database
            $eventsModel = new EventsModel();
            $eventsModel->insertEvent($parsedData);
        } catch (\Exception $e) {
            WP_Statistics()->log($e->getMessage(), 'error');
        }
    }
}