This commit is contained in:
Javier Casares 2026-06-03 06:28:34 +00:00
commit 83d629568a
20 changed files with 1321 additions and 15 deletions

View file

@ -128,7 +128,11 @@ class ToolsPage {
case 'external':
ExternalScanner::queue_all_pending();
ExternalScanner::scan_batch();
$raw_opts = get_option( 'robotstxt_mediaaudit_settings', array() );
$opts_arr = is_array( $raw_opts ) ? $raw_opts : array();
$bs_setting = $opts_arr['external_batch_size'] ?? null;
$ajax_bs = is_numeric( $bs_setting ) ? max( 1, (int) $bs_setting ) : 10;
ExternalScanner::scan_batch( $ajax_bs );
$counts = ExternalScanner::get_status_counts();
$remaining = $counts['queued'] ?? 0;
$done = ( $counts['scanned'] ?? 0 ) + ( $counts['matches'] ?? 0 ) + ( $counts['error'] ?? 0 );