v1.8.1
This commit is contained in:
parent
7b7fff5246
commit
b6a55a7f04
27 changed files with 2221 additions and 45 deletions
5
includes/External/AbstractProvider.php
vendored
5
includes/External/AbstractProvider.php
vendored
|
|
@ -11,6 +11,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
exit;
|
||||
}
|
||||
|
||||
use MediaRightsAudit\Admin\Settings;
|
||||
|
||||
/**
|
||||
* Provides rate-limited scanning via a transient-based per-minute counter.
|
||||
*
|
||||
|
|
@ -41,8 +43,7 @@ abstract class AbstractProvider {
|
|||
* @return positive-int
|
||||
*/
|
||||
public function rate_limit(): int {
|
||||
$raw = get_option( 'robotstxt_mediaaudit_settings', array() );
|
||||
$opts = is_array( $raw ) ? $raw : array();
|
||||
$opts = Settings::get_effective_settings();
|
||||
$val = $opts['rate_limit_per_minute'] ?? null;
|
||||
return is_numeric( $val ) ? max( 1, (int) $val ) : 10;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue