self::date_from( $hours ), 'per_page' => 30, 'severities' => array( 'warning', 'error', 'critical' ), ) ); return array( 'period' => $period, 'hours' => $hours, 'total' => (int) $total, 'criticals' => (int) $criticals, 'top_actions' => $top_actions, 'highlights' => $logs['items'] ?? array(), 'site' => get_bloginfo( 'name' ), 'generated_at' => current_time( 'mysql' ), ); } protected static function date_from( $hours ) { $ts = strtotime( current_time( 'mysql' ) ) - ( $hours * 3600 ); return gmdate( 'Y-m-d H:i:s', $ts ); } public static function render_html( array $report ) { ob_start(); ?> <?php echo esc_html( $report['site'] . ' — ' . ucfirst( $report['period'] ) . ' Activity Digest' ); ?>

— Activity Digest

· last hours
Events
Errors / critical
Distinct actions

Top actions

ActionCount
action_type ); ?>total; ?>

Highlights (warning / error / critical)

WhenSeverityActionDescription
created_at ); ?> severity ); ?> action_type ); ?> description ) ); ?>

Generated by ActivityPilot for WP v. Print this page (Cmd/Ctrl + P) to save as PDF.