HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/plugins/defender-security/src/model/setting/class-audit-logging.php
<?php
/**
 * Handles audit logging settings.
 *
 * @package WP_Defender\Model\Setting
 */

namespace WP_Defender\Model\Setting;

use Calotes\Model\Setting;

/**
 * Model for audit logging settings.
 */
class Audit_Logging extends Setting {

	/**
	 * Option name.
	 *
	 * @var string
	 */
	protected $table = 'wd_audit_settings';
	/**
	 * Is module enabled?
	 *
	 * @defender_property
	 * @var bool
	 */
	public $enabled = false;
	/**
	 * Table column for storage days.
	 *
	 * @defender_property
	 * @var string
	 */
	public $storage_days = '6 months';

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

	/**
	 * Checks if the audit logging is active.
	 *
	 * @return bool Returns true if the audit logging is active, false otherwise.
	 * @since 2.6.5
	 */
	public function is_active(): bool {
		return (bool) apply_filters( 'wd_audit_enable', $this->enabled );
	}

	/**
	 * Retrieves the module name for audit logging.
	 *
	 * @return string The module name for audit logging.
	 */
	public static function get_module_name(): string {
		return esc_html__( 'Audit Logging', 'defender-security' );
	}
}