---
title: Developer Notes
description: "The `gogv_shortcode_process` filter exists for one purpose: **to allow variables to be expanded and evaluated even in places where Gravity Forms does not support merge tags**. If a shortcode supports this filter, users can wrap a variable slug inside that…"
url: "https://brightleafdigital.io/docs/developer-notes/"
updated: "2026-10-11"
category: Global Variables
---

# Developer Notes

The `gogv_shortcode_process` filter exists for one purpose: **to allow variables to be expanded and evaluated even in places where Gravity Forms does not support merge tags**. If a shortcode supports this filter, users can wrap a variable slug inside that shortcode’s tags and the variable will still resolve correctly.

### Why This Filter Exists

Gravity Forms only supports merge tags in certain contexts. When your shortcode appears in a place where merge tags are *not* supported—such as in content in a regular post or page—variables would normally appear as raw slugs. This filter provides a bridge so variable expansion can still happen.

### How Your Shortcode Should Integrate

Add this check at the **top** of your shortcode callback, before you process `$content`:

```
$result = apply_filters( 'gogv_shortcode_process', $content );
if ( $result !== $content ) {
    return $result;
}
```

### What This Enables

- Users can write: `[your_shortcode]{some_variable}[/your_shortcode]`
- Your shortcode passes `{some_variable}` to the filter.
- The plugin detects the variable and expands it.
- The evaluated output is returned to your shortcode.
- Your shortcode receives an already‑processed value.

If no variable is present, the filter does nothing and your shortcode continues normally.

### Required Usage Pattern

Even with the filter, **the user must wrap the variable slug inside your shortcode tags**:

```
[your_shortcode]{total_after_fees}[/your_shortcode]
```

This is the fallback mechanism for any environment where merge tags cannot be used.

### Plan Availability

This developer-level integration is available only on the **Premium** and **Agency** plans.

### Note on Current Relevance

With the introduction of the plugin’s own `[gvfgm_var]` helper shortcode, most users no longer need third‑party shortcodes to integrate with this filter at all. The helper shortcode handles variable expansion globally, making the filter primarily useful for developers who want their shortcode to support variable slugs natively.

### Summary

Implementing this filter makes your shortcode compatible with Global Variables in every context—not just those where Gravity Forms supports merge tags. It ensures variables resolve cleanly anywhere your shortcode runs, keeping the user’s logic consistent across the entire site.

## Customizing Disabled Variable Output

The `gvfgm_disabled_variable_value` filter allows developers to customize what disabled variables resolve to, instead of the default empty string.

### Usage

```
add_filter( 'gvfgm_disabled_variable_value', function( $default_value, $slug, $variable_data ) {
    // Return a custom value for disabled variables
    return 'Variable is disabled';
}, 10, 3 );
```

### Parameters

- `$default_value` (string): The default value (empty string).
- `$slug` (string): The variable slug.
- `$variable_data` (array): The full variable data array.

This filter is useful for debugging or providing fallback content when variables are temporarily disabled.
