This commit is contained in:
Javier Casares 2026-06-03 06:26:23 +00:00
commit 672d0f295f
11 changed files with 438 additions and 73 deletions

View file

@ -203,6 +203,10 @@ class ToolsPage {
$count = ExternalScanner::requeue_errors();
break;
case 'sync_providers':
$count = ExternalScanner::sync_providers();
break;
case 'rescan_usage':
$count = UsageScanner::reset_all();
UsageScanner::schedule();
@ -358,6 +362,7 @@ class ToolsPage {
'schedule_internal' => __( 'Internal scan scheduled.', 'robotstxt-mediaaudit' ),
'schedule_external' => __( 'External scan scheduled.', 'robotstxt-mediaaudit' ),
'requeue_errors' => __( 'Failed scans re-queued. Background scan scheduled.', 'robotstxt-mediaaudit' ),
'sync_providers' => __( 'Provider registry synced. New scans scheduled.', 'robotstxt-mediaaudit' ),
'rescan_usage' => __( 'Usage data cleared. Background scan scheduled.', 'robotstxt-mediaaudit' ),
'reindex_all' => __( 'Index cleared. Fresh indexing scheduled.', 'robotstxt-mediaaudit' ),
'purge_external' => __( 'External scan data purged.', 'robotstxt-mediaaudit' ),
@ -632,6 +637,13 @@ class ToolsPage {
'class' => 'button',
'confirm' => '',
),
array(
'op' => 'sync_providers',
'label' => __( 'Sync provider registry', 'robotstxt-mediaaudit' ),
'desc' => __( 'Creates scan entries for any newly registered external providers. Run this after adding a new provider via the mra/external/providers filter. Already-scanned attachments are not affected.', 'robotstxt-mediaaudit' ),
'class' => 'button',
'confirm' => '',
),
);
$destructive = array(