Skip to main content

Filter: gk/gravityview/template/options/pre-context

Filters the typed field options before context filtering.

Unlike gk/gravityview/template/options, this runs before options are filtered by their contexts key, so added options are context-filtered.

Parameters

NameTypeDescription
$field_optionsarrayArray of field options with label, value, type, default keys.
$field_typestringThe object type: field, widget, search, or a specific type name.
$template_idstringThe template ID.
$field_idstringGF Field ID. Example: 3, 5.2, entry_link, created_by.
$contextstringWhat context are we in? Example: single or directory.
$input_typestringThe input type (textarea, list, select, etc.).
$form_idintThe form ID.

Since

  • 3.1.0

Source

Defined in src/Admin/Rendering/RenderSettings.php at line 303