# hostinger/2.2.4/includes/ComingSoon.php

Hostinger Tools, version 2.2.4. 26 lines.

- Page: https://pluginprobe.com/plugins/hostinger/2.2.4/code/includes/ComingSoon.php
- Raw: https://pluginprobe.com/plugins/hostinger/2.2.4/raw/includes/ComingSoon.php
- Modified: 2024-04-15T13:46:16+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/2.2.4/code/includes/ComingSoon.php#L10-L20`.

```php
<?php

namespace Hostinger;

defined( 'ABSPATH' ) || exit;

class ComingSoon {
	public function __construct() {
		add_action( 'wp_footer', array( $this, 'register_styles' ) );
		add_action( 'template_redirect', array( $this, 'coming_soon' ) );
	}

	public function coming_soon(): void {
		if ( ! is_user_logged_in() && ! is_admin() && ! current_user_can( 'update_plugins' ) ) {
			include_once HOSTINGER_ABSPATH . 'includes/Views/ComingSoon.php';
			die;
		}
	}

	public function register_styles(): void {
		wp_enqueue_style( 'hostinger_main_styles', HOSTINGER_ASSETS_URL . '/css/coming-soon.css', array(), HOSTINGER_VERSION );
	}
}

new ComingSoon();

```
