# elementor/3.29.0-beta4/modules/variables/transformers/global-variable.php

Elementor Website Builder – more than just a page builder, version 3.29.0-beta4. 20 lines.

- Page: https://pluginprobe.com/plugins/elementor/3.29.0-beta4/code/modules/variables/transformers/global-variable.php
- Raw: https://pluginprobe.com/plugins/elementor/3.29.0-beta4/raw/modules/variables/transformers/global-variable.php
- Modified: 2025-04-28T07:15: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/elementor/3.29.0-beta4/code/modules/variables/transformers/global-variable.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 extends Transformer_Base {
	public function transform( $value, $key ) {
		if ( ! trim( $value ) ) {
			return null;
		}

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

```
