# elementor/3.30.1/modules/variables/transformers/global-variable-transformer.php

Elementor Website Builder – more than just a page builder, version 3.30.1. 20 lines.

- Page: https://pluginprobe.com/plugins/elementor/3.30.1/code/modules/variables/transformers/global-variable-transformer.php
- Raw: https://pluginprobe.com/plugins/elementor/3.30.1/raw/modules/variables/transformers/global-variable-transformer.php
- Modified: 2025-06-10T09:36: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/elementor/3.30.1/code/modules/variables/transformers/global-variable-transformer.php#L10-L20`.

```php
<?php

namespace Elementor\Modules\Variables\Transformers;

use Elementor\Modules\AtomicWidgets\PropsResolver\Transformer_Base;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Global_Variable_Transformer extends Transformer_Base {
	public function transform( $value, $key ) {
		if ( ! trim( $value ) ) {
			return null;
		}

		return "var(--{$value})";
	}
}

```
