# hostinger/2.2.0/includes/Preview/Assets.php

Hostinger Tools, version 2.2.0. 23 lines.

- Page: https://pluginprobe.com/plugins/hostinger/2.2.0/code/includes/Preview/Assets.php
- Raw: https://pluginprobe.com/plugins/hostinger/2.2.0/raw/includes/Preview/Assets.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.0/code/includes/Preview/Assets.php#L10-L20`.

```php
<?php

namespace Hostinger\Preview;

use Hostinger\Helper;

defined( 'ABSPATH' ) || exit;

class Assets {
	public function __construct() {
		$helper = new Helper();
		if ( $helper->is_preview_domain() ) {
			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_preview_css' ) );
		}
	}

	public function enqueue_preview_css(): void {
		if ( is_user_logged_in() ) {
			wp_enqueue_style( 'hostinger-preview-styles', HOSTINGER_ASSETS_URL . '/css/hts-preview.css', array(), HOSTINGER_VERSION );
		}
	}
}

```
