Skip to content

Global Variables

New in v3.14.1. Elementor 4.2 introduced Global Variables: typed design tokens (colors, fonts, sizes) that widgets reference by stable id, separate from the older kit-settings presets on the Global settings page. These tools drive Elementor’s own Variables service directly (no raw meta writes), so validation, soft deletion, and CSS cache invalidation all stay under Elementor’s control.

Requires Elementor 4.2+ with the Variables module active, and Elementor selected as the builder on EMCP Tools → Page Builders. All six tools are free tier.

list-variables is on by default; the five write tools start switched off. Switch them on in the Atomic Layout (Elementor 4.0+) section of the Elementor tab on EMCP Tools → Tools, then choose Save changes in the save bar. See Disabling tools.

Lists every Global Variable: id, label, value, type, order, and the current watermark (a version counter used to prevent conflicting writes, see below).

Input:

  • include_deleted (boolean, optional): include soft-deleted variables that can still be restored.

Returns: { count, variables, types, watermark, version }. types is the list of variable types this Elementor install actually supports (typically global-color-variable, global-font-variable, global-size-variable, global-custom-size-variable). Call this first to know what’s valid before creating one.

Read-only, enabled by default.

Input:

  • type (required): one of the types from list-variables
  • label (required): CSS custom-property name, no spaces, 50 characters max
  • value (required): 512 characters max

Returns: the new variable’s stable id and the updated watermark.

Disabled by default (write).

Input:

  • id (required)
  • label, value (required; both must be sent even if only one changes)
  • type, order (optional)

Disabled by default (write).

Soft-deletes a variable. Existing references may stop resolving until it’s restored.

Input:

  • id (required)
  • confirm: true (required)

Disabled by default, destructive.

Restores a soft-deleted variable, optionally overriding its label, value, or a compatible type.

Input:

  • id (required)
  • label, value, type (optional overrides)

Disabled by default (write).

Applies multiple create/update/delete/restore operations atomically: all or nothing.

Input:

  • watermark (required): from list-variables; the batch is rejected with a stale_watermark error (409) if variables changed since you listed them, so you don’t overwrite a concurrent edit blind
  • operations (required): array of { type: "create"|"update"|"delete"|"restore", ...same fields as the single-item tools above }
  • confirm: true: required if any operation is a delete

Disabled by default, destructive.

Beyond the usual validation errors, expect Elementor’s own domain errors surfaced with clear codes: variable_limit_reached, duplicated_label, type_mismatch, invalid_variable, batch_operation_failed, and variable_not_found (404). kit_not_found (404) means no active Elementor kit exists yet. Visit Elementor → Site Settings once to initialize it.

Always call list-variables before a batch write. The returned watermark is your concurrency guard, and types tells you exactly which variable types this site’s Elementor version supports before you try to create one.