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

Hostinger Tools, version 3.0.3. 23 lines.

- Page: https://pluginprobe.com/plugins/hostinger/3.0.3/code/includes/Preview/Assets.php
- Raw: https://pluginprobe.com/plugins/hostinger/3.0.3/raw/includes/Preview/Assets.php
- Modified: 2024-07-16T10:48: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.3/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 );
		}
	}
}

```
