HEX
Server: Apache
System: Linux d5123.usc1.stableserver.net 5.14.0-570.17.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Sat May 24 12:53:17 EDT 2025 x86_64
User: d5123 (1001)
PHP: 8.4.21
Disabled: NONE
Upload Files
File: /home/d5123/myboofola_com/wp-content/plugins/defender-security/src/class-bootstrap.php
<?php

namespace WP_Defender;

use WP_Defender\Traits\Defender_Bootstrap;
use WP_Defender\Component\Rate;

/**
 * Class Bootstrap
 *
 * @package WP_Defender
 */
class Bootstrap {
	use Defender_Bootstrap;

	/**
	 * Activation.
	 */
	public function activation_hook(): void {
		$this->activation_hook_common();
		$this->set_free_installation_timestamp();
	}

	/**
	 * Add option with plugin install date.
	 *
	 * @since 2.4
	 */
	protected function set_free_installation_timestamp(): void {
		// Let's equate the plugin installation and postponed notice dates. This will simplify future checks.
		$install_date = (int) get_site_option( Rate::SLUG_FREE_INSTALL_DATE, 0 );
		if ( 0 === $install_date ) {
			update_site_option( Rate::SLUG_FREE_INSTALL_DATE, time() );
			update_site_option( Rate::SLUG_POSTPONED_NOTICE_DATE, time() );
		} else {
			update_site_option( Rate::SLUG_POSTPONED_NOTICE_DATE, $install_date );
		}
	}

	/**
	 * Load all modules.
	 */
	public function init_modules(): void {
		$this->init_modules_common();
	}

	/**
	 * Deactivation clears only free version cron hooks.
	 */
	public function deactivation_hook(): void {
		$this->deactivation_hook_common();
	}
}