# hostinger/3.0.21/includes/Activator.php

Hostinger Tools, version 3.0.21. 32 lines.

- Page: https://pluginprobe.com/plugins/hostinger/3.0.21/code/includes/Activator.php
- Raw: https://pluginprobe.com/plugins/hostinger/3.0.21/raw/includes/Activator.php
- Modified: 2024-07-31T10:22:58+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/hostinger/3.0.21/code/includes/Activator.php#L10-L20`.

```php
<?php

namespace Hostinger;

defined( 'ABSPATH' ) || exit;

class Activator {
	public const INSTALLATION_OPTION_NAME = 'hts_new_installation';
	/**
	 * @return void
	 */
	public static function activate(): void {
		$options = new DefaultOptions();
		$options->add_options();

		self::update_installation_state_on_activation();
	}

	/**
	 * Saves installation state.
	 *
	 * @return void
	 */
	public static function update_installation_state_on_activation(): void {
		$installation_state = get_option( self::INSTALLATION_OPTION_NAME, false );

		if ( $installation_state !== 'old' ) {
			add_option( self::INSTALLATION_OPTION_NAME, 'new' );
		}
	}
}

```
