admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'brverify_admin' ), 'i18n' => array( 'starting' => __( 'Starting backup…', '007aj-backup-restore-verifier' ), 'startingRestore' => __( 'Starting restore…', '007aj-backup-restore-verifier' ), 'running' => __( 'Job in progress…', '007aj-backup-restore-verifier' ), 'completed' => __( 'Backup completed.', '007aj-backup-restore-verifier' ), 'restoreCompleted' => __( 'Restore completed.', '007aj-backup-restore-verifier' ), 'failed' => __( 'Job failed.', '007aj-backup-restore-verifier' ), 'idle' => __( 'Ready.', '007aj-backup-restore-verifier' ), 'confirmRestore' => __( 'Restore the selected components from this backup? A pre-restore snapshot will be taken for rollback.', '007aj-backup-restore-verifier' ), 'selectComponent' => __( 'Select at least one component.', '007aj-backup-restore-verifier' ), ), ) ); } /** * Render the main admin page. */ public function render_page(): void { if ( ! current_user_can( 'manage_brverify' ) ) { wp_die( esc_html__( 'You do not have permission to manage 007AJ Backup Restore Verifier.', '007aj-backup-restore-verifier' ) ); } $health = ( new Health() )->collect(); $repo = new Job_Repository(); $jobs = $repo->list_recent( 10 ); $arts = $repo->list_artifacts( 15 ); $exclusions = Working_Dir::default_exclusions(); $retention = Settings::retention_count(); $active = null; foreach ( $jobs as $job ) { if ( in_array( (string) $job['status'], array( Job_States::STATUS_PENDING, Job_States::STATUS_RUNNING ), true ) ) { $active = $job; break; } } ?>

…

%