ARGUS WordPress Defence 1.0.0 — first production release
Automatic WordPress security: local firewall, malware and file-integrity scanning, vulnerability protection, quarantine, scheduled backups, an optional page cache, and automatic global threat intelligence. See README.md for installation, update, and uninstall instructions.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$argus_compact = $argus_compact ?? false;
|
||||
$action = $finding->evidence['action'] ?? null;
|
||||
$finding_ip = $finding->evidence['ip'] ?? null;
|
||||
?>
|
||||
<div class="argus-wpd-finding-card argus-wpd-sev-<?php echo esc_attr( $finding->severity ); ?>">
|
||||
<div class="argus-wpd-finding-summary">
|
||||
<span class="argus-wpd-sev-badge"><?php echo esc_html( strtoupper( $finding->severity ) ); ?></span>
|
||||
<span class="argus-wpd-finding-title">
|
||||
<?php if ( $finding_ip ) : ?>
|
||||
<span class="argus-wpd-flag" title="<?php echo esc_attr( Argus_GeoIP::label( $finding_ip ) ); ?>"><?php echo esc_html( Argus_GeoIP::icon( $finding_ip ) ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php echo esc_html( $finding->title ); ?>
|
||||
</span>
|
||||
<span class="argus-wpd-status-pill argus-wpd-status-<?php echo esc_attr( $finding->status ); ?>"><?php echo esc_html( ucfirst( str_replace( '_', ' ', $finding->status ) ) ); ?></span>
|
||||
<span class="argus-wpd-finding-time"><?php echo esc_html( human_time_diff( strtotime( $finding->last_seen_at . ' UTC' ) ) ); ?> <?php esc_html_e( 'ago', 'argus-wordpress-defence' ); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="argus-wpd-finding-actions">
|
||||
<?php if ( $action && ! empty( $action['type'] ) ) : ?>
|
||||
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
|
||||
<?php wp_nonce_field( 'argus_wpd_run_action_' . $finding->id, 'argus_wpd_action_nonce' ); ?>
|
||||
<button type="submit" class="button button-primary" onclick="return confirm('<?php echo esc_js( sprintf( __( 'Run "%s" now? This will make a real change to your site.', 'argus-wordpress-defence' ), $action['label'] ) ); ?>')">
|
||||
<?php echo esc_html( $action['label'] ); ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php if ( Argus_Findings::STATUS_OPEN === $finding->status ) : ?>
|
||||
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
|
||||
<?php wp_nonce_field( 'argus_wpd_set_status_' . $finding->id, 'argus_wpd_status_nonce' ); ?>
|
||||
<button type="submit" name="new_status" value="acknowledged" class="button"><?php esc_html_e( 'Acknowledge', 'argus-wordpress-defence' ); ?></button>
|
||||
<button type="submit" name="new_status" value="resolved" class="button"><?php esc_html_e( 'Resolve', 'argus-wordpress-defence' ); ?></button>
|
||||
<button type="submit" name="new_status" value="risk_accepted" class="button"><?php esc_html_e( 'Accept Risk', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<form method="post" action="<?php echo esc_url( add_query_arg( 'finding', $finding->id ) ); ?>" style="display:inline">
|
||||
<?php wp_nonce_field( 'argus_wpd_delete_finding_' . $finding->id, 'argus_wpd_delete_finding_nonce' ); ?>
|
||||
<button type="submit" class="button" style="color:var(--rose)" onclick="return confirm('<?php echo esc_js( __( 'Delete this finding permanently? This cannot be undone.', 'argus-wordpress-defence' ) ); ?>')"><?php esc_html_e( 'Delete', 'argus-wordpress-defence' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php if ( ! $argus_compact && ! empty( $finding->explain ) ) : ?>
|
||||
<details class="argus-wpd-finding-details">
|
||||
<summary><?php esc_html_e( 'Show full explanation', 'argus-wordpress-defence' ); ?></summary>
|
||||
<?php echo Argus_Explain::render( $finding->explain ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
</details>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user