# hostinger/2.1.1/includes/public/class-hostinger-public-assets.php

Hostinger Tools, version 2.1.1. 23 lines.

- Page: https://pluginprobe.com/plugins/hostinger/2.1.1/code/includes/public/class-hostinger-public-assets.php
- Raw: https://pluginprobe.com/plugins/hostinger/2.1.1/raw/includes/public/class-hostinger-public-assets.php
- Modified: 2024-03-06T14:16:54+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.1.1/code/includes/public/class-hostinger-public-assets.php#L10-L20`.

```php
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Hostinger_Public_Assets {
	public function __construct() {
		$helper = new Hostinger_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 );
		}
	}
}

new Hostinger_Public_Assets();

```
