# fluent-cart/1.3.21/app/Services/Theme/FrontendTheme.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.21. 46 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.21/code/app/Services/Theme/FrontendTheme.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.21/raw/app/Services/Theme/FrontendTheme.php
- Modified: 2026-04-07T13:41:30+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/fluent-cart/1.3.21/code/app/Services/Theme/FrontendTheme.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Services\Theme;

use FluentCart\Api\StoreSettings;
use FluentCart\Framework\Support\Arr;

class FrontendTheme {

	public static function applyTheme() {
		// add_action( 'wp_enqueue_scripts', function () {
		// 	if ( ! is_admin() ) {
		// 		( new static() )->apply();
		// 	}
		// } );
	}

	protected function apply() {

		$themeData = $this->get();
		$style = $this->prepareInlineStyle($themeData);

		if (!empty($style)){
			wp_register_style( 'fluent-cart-inline-style', false, [], FLUENTCART_VERSION );
			wp_enqueue_style( 'fluent-cart-inline-style' );
			wp_add_inline_style( 'fluent-cart-inline-style', "body{ {$style}}" );
		}
	}

	protected function get(): array {
		return ( new StoreSettings() )->get( 'frontend_theme', [] );
	}

	protected function prepareInlineStyle(array $data): string {
		$style = "";
		foreach ($data as $name => $value) {
			if(!empty($value)) {
				$style .= $name . ':' . $value . ';';
			}
		}
		return $style;
	}



}
```
