# defender-security/6.2.3/src/model/setting/class-global-ip-lockout.php

Defender Security – Malware Scanner, Login Security &amp; Firewall, version 6.2.3. 89 lines.

- Page: https://pluginprobe.com/plugins/defender-security/6.2.3/code/src/model/setting/class-global-ip-lockout.php
- Raw: https://pluginprobe.com/plugins/defender-security/6.2.3/raw/src/model/setting/class-global-ip-lockout.php
- Modified: 2026-02-02T07:00:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/defender-security/6.2.3/code/src/model/setting/class-global-ip-lockout.php#L10-L20`.

```php
<?php
/**
 * Handles global ip lockout settings.
 *
 * @package WP_Defender\Model\Setting
 */

namespace WP_Defender\Model\Setting;

use Calotes\Model\Setting;

/**
 * Model for global ip lockout settings.
 */
class Global_Ip_Lockout extends Setting {

	/**
	 * Option name.
	 *
	 * @var string
	 */
	protected $table = 'wd_global_ip_settings';

	/**
	 * Is module enabled.
	 *
	 * @var bool
	 * @defender_property
	 */
	public bool $enabled = false;

	/**
	 * Allow self unlock?
	 *
	 * @var bool
	 * @defender_property
	 */
	public bool $allow_self_unlock = true;

	/**
	 * Table column for autosync.
	 *
	 * @var bool
	 * @defender_property
	 */
	public $blocklist_autosync = false;

	/**
	 * Validation rules.
	 *
	 * @var array
	 */
	protected $rules = array(
		array( array( 'enabled', 'blocklist_autosync', 'allow_self_unlock' ), 'boolean' ),
	);

	/**
	 * Define settings labels.
	 *
	 * @return array
	 */
	public function labels(): array {
		return array(
			'enabled'            => self::get_module_name(),
			'blocklist_autosync' => esc_html__( 'Permanently Blocked IPs', 'defender-security' ),
		);
	}

	/**
	 * Get the module name.
	 *
	 * @return string The module name.
	 */
	public static function get_module_name(): string {
		return esc_html__( 'Custom IP List', 'defender-security' );
	}

	/**
	 * Get the module state based on the given flag.
	 *
	 * @param  bool $flag  The flag indicating the module state.
	 *
	 * @return string The module state, either 'active' or 'inactive'.
	 */
	public static function get_module_state( $flag ): string {
		return $flag ? esc_html__( 'active', 'defender-security' ) : esc_html__( 'inactive', 'defender-security' );
	}
}

```
