This commit is contained in:
Javier Casares 2026-06-08 18:01:39 +00:00
commit b6a55a7f04
27 changed files with 2221 additions and 45 deletions

View file

@ -11,6 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
exit;
}
use MediaRightsAudit\Admin\Settings;
use MediaRightsAudit\Core\Queue\Scheduler;
/**
@ -142,8 +143,7 @@ class ExternalScanner {
* @return void
*/
public static function process_scheduled_batch(): void {
$raw = get_option( 'robotstxt_mediaaudit_settings', array() );
$opts = is_array( $raw ) ? $raw : array();
$opts = Settings::get_effective_settings();
$bs_val = $opts['external_batch_size'] ?? null;
$batch_size = is_numeric( $bs_val ) ? max( 1, (int) $bs_val ) : 10;
@ -151,6 +151,10 @@ class ExternalScanner {
delete_transient( 'mra_alert_count' );
if ( is_multisite() && 'central' === get_site_option( 'robotstxt_mediaaudit_network_mode', 'per_site' ) ) {
\MediaRightsAudit\Core\NetworkDatabase::sync_site( get_current_blog_id() );
}
if ( self::get_pending_count() > 0 ) {
Scheduler::schedule_single( self::AS_HOOK );
}