fieldOptions

apply_filters( 'fieldOptions', options Object, editField Object, option Object )

  add_filter( 'fieldOptions', options Object, editField Object, option Object )

Filters the field options.

Structure:

  • allFields: All fields available for all field types.
  • [fieldType]: The field type specific options. (checkbox, dropdown, toggle, etc.)
    • [OptionKey]: This is the option key.
      • [type]: How the option should be rendered. (select, radio, toggle)
      • [label]: The label of the option.
      • [default]: The default value of the option.
      • [data]: The data used to render the option.
      • [conditions]: The conditions that need to be met for the option to be rendered.

Parameters

NameTypeDescription
optionsObject

All available options.

editFieldObject

The field being edited.

optionObject

The current options.

Returns:

The field options.

Type: 
Object