[ __( 'Login', 'aiforya-activity-log' ), '#6ee7b7' ], 'user_logout' => [ __( 'Logout', 'aiforya-activity-log' ), '#94a3b8' ], 'login_failed' => [ __( 'Failed login', 'aiforya-activity-log' ), '#fca5a5' ], 'post_published' => [ __( 'Published', 'aiforya-activity-log' ), '#6ee7b7' ], 'post_updated' => [ __( 'Edited', 'aiforya-activity-log' ), '#93c5fd' ], 'post_trashed' => [ __( 'Trashed', 'aiforya-activity-log' ), '#fcd34d' ], 'post_deleted' => [ __( 'Deleted', 'aiforya-activity-log' ), '#fca5a5' ], 'plugin_activated' => [ __( 'Plugin activated', 'aiforya-activity-log' ), '#6ee7b7' ], 'plugin_deactivated' => [ __( 'Plugin deactivated', 'aiforya-activity-log' ), '#fcd34d' ], 'theme_switched' => [ __( 'Theme', 'aiforya-activity-log' ), '#93c5fd' ], 'user_registered' => [ __( 'Account created', 'aiforya-activity-log' ), '#6ee7b7' ], 'user_updated' => [ __( 'Account updated', 'aiforya-activity-log' ), '#93c5fd' ], 'user_deleted' => [ __( 'Account deleted', 'aiforya-activity-log' ), '#fca5a5' ], ]; return $map[ $action ] ?? [ $action, '#94a3b8' ]; } public function render( array $args ): void { $repo = Aiforya_Al_Repository::get_instance(); $events = $repo->recent( 50 ); $total = $repo->count_all(); $fmt = get_option( 'date_format' ) . ' ' . get_option( 'time_format' ); $s = Aiforya_Al_Settings::get_instance()->get(); $retention = isset( $s['retention_days'] ) ? (int) $s['retention_days'] : 30; $tracked = count( array_filter( [ ! empty( $s['log_auth'] ), ! empty( $s['log_content'] ), ! empty( $s['log_plugins'] ), ! empty( $s['log_users'] ), ] ) ); // Helper D2 : pastille d'aide « ? » charte (AiforyaTooltip). $text déjà traduit. $tip = static function ( $text ) { printf( '', esc_attr( $text ) ); }; ?>
| description ); ?> | user_login ? (string) $ev->user_login : '—' ); ?> |