includes/Support/class-log.php
Log Class
Class Log
Log Class
class LogConstants
| Constant | Visibility | Value | Line |
|---|---|---|---|
SALT_KEY | private | \'wppo_activity_log_salt\' | 35 |
Properties
| Property | Visibility | Type | Default | Line |
|---|---|---|---|---|
$version_memo | private static | array | array() | 47 |
publicstatic reset_version_memo()
public static function reset_version_memo(): voidReset the version memo (tests only).
Return: void.
privatestatic get_cache_version()
private static function get_cache_version(): intGet the activity cache version, memoized per request per site.
Return: int.
private __construct()
private function __construct()Private constructor to prevent direct instantiation.
privatestatic salted_cache_active()
private static function salted_cache_active(): boolWhether the salted object-cache layer is usable for persistence.
Return: bool.
publicstatic add()
public static function add($activity): voidAdd a new activity log entry. Parameter Type Default Description $activitymixed— The activity description to log; non-strings are ignored.
Return: void.
publicstatic get_recent_activities()
public static function get_recent_activities(array $params): arrayGet recent activities with pagination and caching. Parameter Type Default Description $paramsarray— Pagination parameters including \’page\’ and \’per_page\’.
Return: array — Cached or freshly queried results with pagination details.