v1.8.1
This commit is contained in:
parent
7b7fff5246
commit
b6a55a7f04
27 changed files with 2221 additions and 45 deletions
8
includes/External/ExternalScanner.php
vendored
8
includes/External/ExternalScanner.php
vendored
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue